Skip to content
Dashboard
Theme
Theme

Upload a logo

POST /v1/branding/logo: Upload a logo.

View Markdown

POST /v1/branding/logo

Stores a logo on the assets host and returns its URL for logo_url (set it with PATCH /v1/branding; this call does not change the branding). The file travels base64-encoded in data. Its type is read from the bytes, not from any header: a PNG (16 to 2048 pixels per side) is decoded and re-encoded without metadata chunks; an SVG must have an SVG root with a viewBox of at most 2048 units and is rebuilt from a safe subset (shapes, groups, gradients and clip paths with presentation attributes; scripts, styles, event handlers, text, images, links and every external or data: reference are removed). At most 256 KiB before and after normalising. The same file always gets the same URL. Older logos of the environment that are not the current logo_url are removed after an hour. Anything else answers logo_invalid.

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

  • data string Required

    The PNG or SVG file, standard base64 (padding required). At most 256 KiB decoded.

    min length 4 · max length 349528

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/branding/logo" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "example_data"
}'
Response 201
{
"object": "branding_logo",
"logo_url": "https://app.acme.com/callback",
"content_type": "image/png",
"width": 1,
"height": 1,
"size_bytes": 1
}