update_brand_kit
Change the organization’s brand kit — the same settings as Settings → Brand kit, which every branded document, report and generated ad image uses.
Pass only the fields to change. An omitted field is left alone; "" clears a field so it inherits again (from the brand assets, the website, the organization record, or the neutral default — see get_brand_kit for the order).
Requires a user-bound credential (OAuth login or a personal API key) whose user can manage the organization — the same permission as the settings page. Anonymous organization API keys get error_type: "user_credential_required". The change is recorded in the audit log under that person.
Parameters#
All optional; pass at least one.
| Name | Type | Description |
|---|---|---|
brand_name | string | Brand name printed on documents; "" falls back to the organization’s name |
accent_color | string | Accent (primary brand) colour, #rrggbb |
secondary_color | string | Secondary colour, #rrggbb |
ink_color | string | Body-text colour, #rrggbb; must contrast with surface_color |
surface_color | string | Page background colour, #rrggbb |
heading_font | string | Font key: inter, noto-serif, jetbrains-mono or lato |
body_font | string | Font key, as above |
mono_font | string | Font key, as above |
logo_primary_path | string | Primary logo: an image already in the shared workspace, e.g. /org/images/logo.png, or a brand logo’s /org/brand/logos/ path |
logo_on_dark_path | string | Logo for dark backgrounds, as above |
logo_icon_path | string | Square icon / mark, as above |
logo_primary_creative_id | string | Primary logo as a brand-logo creative id from save_brand_asset; wins over the path |
logo_on_dark_creative_id | string | Logo for dark backgrounds, as above |
logo_icon_creative_id | string | Square icon / mark, as above |
footer_text | string | Client-facing footer line (max 240 characters) |
attribution | string | One of adlyse, agency, or none. Agency and none require subscription coverage. Agency also requires a parent logo. |
show_adlyse | boolean | Legacy: true selects Adlyse; false selects no attribution (subscription required). Prefer attribution. |
Returns#
{
"success": true,
"changed": ["accent_color", "secondary_color"],
"brand_kit": {
"brand_name": "Northwind Media",
"palette": {
"accent": "#1a73e8",
"secondary": "#0b3d91",
"ink": "#20231f",
"surface": "#ffffff"
},
"sources": { "accent": "explicit", "secondary": "explicit", "ink": "floor", "...": "..." },
"warnings": [],
"...": "same shape as get_brand_kit"
},
"source": "brand_kit"
}brand_kit is the kit as resolved after the change, so warnings reports anything the new values cause — for example an ink/surface pair too faint for body text, in which case the default ink is used.
Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid credential |
user_credential_required | Called with an anonymous organization API key |
permission_denied | The user cannot manage the organization |
validation_error | No field given, a colour that is not hex, an unknown font, or a logo path that is not an image under /org/. Nothing is changed. |
See also#
get_brand_kit— read the kit and where each value comes fromlist_files— find a logo already in the workspace; upload new ones in the app (Files)