Save brand style guide
Saves the active brand's style guide, replacing any earlier one from the same site: palette, typography, shapes, logo, imagery, voice, and do and don't rules.
Tool name: save-brand-style-guide.
Saves the active brand's style guide, replacing any earlier one from the same site: palette, typography, shapes, logo, imagery, voice, and do and don't rules. Never for a site read to make ads for another brand. Use only assetIds that extract-brand-style returned for this brand. Set confirmed to true only after the user agreed the guide is right.
When to use
After extract-brand-style, once you have written the guide; again with confirmed: true when the user approves it, or after any change they ask for.
Access
| Property | Value |
|---|---|
| Required scope | write |
| Publishes | No |
| Read-only | No |
| Destructive | Yes |
| Idempotent | Yes |
| Open world | No |
Input
| Field | Type | Required | Description |
|---|---|---|---|
sourceUrl | string | null | Yes | The website the guide was built from, or null. At most 2048 characters. |
guide | object | Yes | |
guide.palette | object[] | Yes | At least 1 item, at most 12 items. |
guide.palette[].hex | string | Yes | |
guide.palette[].role | string | Yes | One of primary, accent, background, surface, text, muted, cta, ctaText, other. |
guide.palette[].name | string | No | At most 60 characters. |
guide.palette[].source | string | Yes | measured: read from the page styles; site: found on the site, such as a file or a stated name; inferred: your judgement. One of measured, site, inferred. |
guide.typography | object | Yes | |
guide.typography.heading | object | Yes | |
guide.typography.heading.family | string | Yes | The font family name, as the site names it. At most 100 characters. |
guide.typography.heading.weight | integer | No | Minimum 100, maximum 900. |
guide.typography.heading.fallback | string | Yes | The kind of font, used when the family cannot load. One of serif, sans-serif, monospace, display, handwriting. |
guide.typography.heading.source | string | Yes | measured: read from the page styles; site: found on the site, such as a file or a stated name; inferred: your judgement. One of measured, site, inferred. |
guide.typography.heading.assetIds | integer[] | No | FONT assetIds from extract-brand-style for this family. Leave out to load the family from Google Fonts. At most 12 items. |
guide.typography.body | object | Yes | |
guide.typography.body.family | string | Yes | The font family name, as the site names it. At most 100 characters. |
guide.typography.body.weight | integer | No | Minimum 100, maximum 900. |
guide.typography.body.fallback | string | Yes | The kind of font, used when the family cannot load. One of serif, sans-serif, monospace, display, handwriting. |
guide.typography.body.source | string | Yes | measured: read from the page styles; site: found on the site, such as a file or a stated name; inferred: your judgement. One of measured, site, inferred. |
guide.typography.body.assetIds | integer[] | No | FONT assetIds from extract-brand-style for this family. Leave out to load the family from Google Fonts. At most 12 items. |
guide.shapes | object | Yes | Plain descriptions, such as "pill buttons, 9999px" or "16px card corners, thin 1px borders". |
guide.shapes.corners | string | Yes | At most 300 characters. |
guide.shapes.buttons | string | Yes | At most 300 characters. |
guide.shapes.cards | string | No | At most 300 characters. |
guide.shapes.lines | string | No | At most 300 characters. |
guide.shapes.other | string | No | At most 300 characters. |
guide.logo | object | No | |
guide.logo.assetId | integer | Yes | A LOGO assetId from extract-brand-style. |
guide.logo.use | string | Yes | The background the logo is made for. One of onDark, onLight, any. |
guide.imagery | string | Yes | The look of the brand's photos and visuals, from the screenshots. At most 1500 characters. |
guide.voice | string | Yes | How the brand writes, from its own copy. At most 1500 characters. |
guide.dos | string[] | Yes | At most 10 items. |
guide.donts | string[] | Yes | At most 10 items. |
confirmed | boolean | Yes | True only when the user has approved the guide. |
replacesSite | boolean | No | True only when the user chose sourceUrl as this brand's own website. Without it, a guide from another site than the brand's saved guide is refused, so a site read to make ads for another brand never replaces this brand's style. |
Output
| Field | Type | Required | Description |
|---|---|---|---|
guide | object | null | Yes | |
confirmedAt | string | null | Yes | When the user approved the guide; null while it is a draft. |
sourceUrl | string | null | Yes | |
logo | object | null | Yes | |
fontCss | string | Yes | CSS that loads the guide's fonts. Paste it into the <style> of an HTML layout before using the font families. |
images | object[] | Yes | The site's own images: product shots, app screens, the hero and its social image, stored as brand assets. Pass a url as an imageUrl reference to generate-creatives, or use it as an <img> src in render-creative html. At most 6 items. |
REST equivalent
PUT /v1/brands/{brandId}/style-guide, Save brand style guide. CLI: koast save-brand-style-guide.