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
Headers
Section titled “Headers”
Minor version; defaults to the environment’s pin.OhAuthCat-Versionstring
Honoured for 24 h; a replay returns the original response.Idempotency-Keystringmin length 1 · max length 255
Request body
Section titled “Request body”
The PNG or SVG file, standard base64 (padding required). At most 256 KiB decoded.datastring Requiredmin length 4 · max length 349528
Responses
Section titled “Responses”- 201 Created BrandingLogo
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 401 Codes: authentication_required, api_key_invalid. Error
- 403 Codes: api_key_scope_missing, ip_not_allowed, plan_limit_reached. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
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"}'const response = await fetch("https://api.ohauthcat.com/v1/branding/logo", { method: "POST", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "data": "example_data" }),});const data = await response.json();import osimport requests
response = requests.post( "https://api.ohauthcat.com/v1/branding/logo", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"}, json={ "data": "example_data", },)data = response.json(){ "object": "branding_logo", "logo_url": "https://app.acme.com/callback", "content_type": "image/png", "width": 1, "height": 1, "size_bytes": 1}