Skip to content
Dashboard
Theme
Theme

Update branding

PATCH /v1/branding: Update branding.

View Markdown

PATCH /v1/branding

Scope
branding:write
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • app_name string or null

    The app name shown in portal invite emails, 1–100 characters without control characters.

    max length 100

  • light BrandingTheme

    Theme colours as hex (#rgb or #rrggbb). The portal themes primary only (DESIGN.md §6); it always uses its own neutral surfaces and text. The hosted consent screen uses all four (accent, or else primary, as its accent); unset colours are the product defaults. A theme whose foreground or accent has a contrast below 4.5:1 (WCAG AA) on its background (or the default background) answers parameter_invalid naming the failing colour, for example light.foreground.

  • dark BrandingTheme

    Theme colours as hex (#rgb or #rrggbb). The portal themes primary only (DESIGN.md §6); it always uses its own neutral surfaces and text. The hosted consent screen uses all four (accent, or else primary, as its accent); unset colours are the product defaults. A theme whose foreground or accent has a contrast below 4.5:1 (WCAG AA) on its background (or the default background) answers parameter_invalid naming the failing colour, for example light.foreground.

  • logo_url string (uri) or null

    A URL returned by POST /v1/branding/logo for this environment (logos are served only from the assets host); any other URL answers parameter_invalid. null or "" removes the logo.

  • font string or null

    A font family name of at most 100 characters without ;{}<>"'\\()/*@: or control characters. The hosted consent screen recognises system, serif and mono and uses the system font for any other value.

  • radius integer or null

    Corner radius in pixels. Values above 12 are accepted for compatibility but the portal renders at most 12 (DESIGN.md §6) and the hosted consent screen at most 16; new values should be 0–12.

    min 0 · max 32

  • privacy_url string (uri) or null

  • terms_url string (uri) or null

  • favicon_url string (uri) or null

    A URL returned by POST /v1/branding/favicon for this environment; null or "" removes it.

  • font_url string (uri) or null

    A URL returned by POST /v1/branding/font for this environment; null or "" removes it.

  • surfaces BrandingSurfaces

    Separate branding for the setup portal, the consent screen and emails, each falling back to the main branding field by field. On an update the object replaces the stored sets; {} removes them.

Errors share one shape; see the error code catalogue.

curl -X PATCH \
"https://api.ohauthcat.com/v1/branding" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"app_name": "example_app_name",
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"radius": 0,
"privacy_url": "https://app.acme.com/callback",
"terms_url": "https://app.acme.com/callback",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"surfaces": {
"portal": {
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"radius": 0,
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"logo_url_dark": "https://example.com",
"colors": {
"page_background": {
"light": "#C94820",
"dark": "#C94820"
},
"card_background": {
"light": "#C94820",
"dark": "#C94820"
},
"text": {
"light": "#C94820",
"dark": "#C94820"
},
"muted_text": {
"light": "#C94820",
"dark": "#C94820"
},
"accent": {
"light": "#C94820",
"dark": "#C94820"
},
"border": {
"light": "#C94820",
"dark": "#C94820"
}
}
},
"consent": {
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"radius": 0,
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"logo_url_dark": "https://example.com",
"colors": {
"page_background": {
"light": "#C94820",
"dark": "#C94820"
},
"card_background": {
"light": "#C94820",
"dark": "#C94820"
},
"text": {
"light": "#C94820",
"dark": "#C94820"
},
"muted_text": {
"light": "#C94820",
"dark": "#C94820"
},
"accent": {
"light": "#C94820",
"dark": "#C94820"
},
"border": {
"light": "#C94820",
"dark": "#C94820"
}
}
},
"email": {
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"radius": 0,
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"logo_url_dark": "https://example.com",
"colors": {
"page_background": {
"light": "#C94820",
"dark": "#C94820"
},
"card_background": {
"light": "#C94820",
"dark": "#C94820"
},
"text": {
"light": "#C94820",
"dark": "#C94820"
},
"muted_text": {
"light": "#C94820",
"dark": "#C94820"
},
"accent": {
"light": "#C94820",
"dark": "#C94820"
},
"border": {
"light": "#C94820",
"dark": "#C94820"
}
}
}
}
}'
Response 200
{
"object": "branding",
"app_name": "example_app_name",
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"radius": 1,
"privacy_url": "https://app.acme.com/callback",
"terms_url": "https://app.acme.com/callback",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"surfaces": {
"portal": {
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"radius": 0,
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"logo_url_dark": "https://example.com",
"colors": {
"page_background": {
"light": "#C94820",
"dark": "#C94820"
},
"card_background": {
"light": "#C94820",
"dark": "#C94820"
},
"text": {
"light": "#C94820",
"dark": "#C94820"
},
"muted_text": {
"light": "#C94820",
"dark": "#C94820"
},
"accent": {
"light": "#C94820",
"dark": "#C94820"
},
"border": {
"light": "#C94820",
"dark": "#C94820"
}
}
},
"consent": {
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"radius": 0,
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"logo_url_dark": "https://example.com",
"colors": {
"page_background": {
"light": "#C94820",
"dark": "#C94820"
},
"card_background": {
"light": "#C94820",
"dark": "#C94820"
},
"text": {
"light": "#C94820",
"dark": "#C94820"
},
"muted_text": {
"light": "#C94820",
"dark": "#C94820"
},
"accent": {
"light": "#C94820",
"dark": "#C94820"
},
"border": {
"light": "#C94820",
"dark": "#C94820"
}
}
},
"email": {
"light": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"dark": {
"primary": "#C94820",
"background": "#C94820",
"foreground": "#C94820",
"accent": "#C94820"
},
"radius": 0,
"logo_url": "https://app.acme.com/callback",
"font": "Inter",
"favicon_url": "https://app.acme.com/callback",
"font_url": "https://app.acme.com/callback",
"logo_url_dark": "https://example.com",
"colors": {
"page_background": {
"light": "#C94820",
"dark": "#C94820"
},
"card_background": {
"light": "#C94820",
"dark": "#C94820"
},
"text": {
"light": "#C94820",
"dark": "#C94820"
},
"muted_text": {
"light": "#C94820",
"dark": "#C94820"
},
"accent": {
"light": "#C94820",
"dark": "#C94820"
},
"border": {
"light": "#C94820",
"dark": "#C94820"
}
}
}
}
}