Branding options
The Management API stores seven organization-scoped branding values in KV. They are available to authenticated management clients; automatic Hosted Auth and email rendering is not implemented.
| Option | Description |
|---|---|
| Primary color | Stored primary color value for management clients. |
| Background color | Stored page background value for management clients. |
| Accent color | Stored accent color value for management clients. |
| Border radius | Stored border-radius value. The API does not constrain it to a named scale. |
| Font family | Stored font-family value. The API does not fetch or validate remote fonts. |
| Logo (light) | Stored light-theme logo URL. Uploading an organization logo is a separate R2-backed endpoint. |
| Logo (dark) | Stored dark-theme logo URL; this API does not apply an automatic fallback. |
Per-organization branding
Each record is keyed by tenant and organization in KV. Reads return all seven fields with null values when no record exists; no runtime rendering or latency guarantee is implied.
Management API endpoint
Update organization branding with a PATCH request using camelCase field names. Omitted fields and null currently retain the stored value; send a replacement string to change a field.
curl -X PATCH https://xid.dev/v1/organizations/org_xxx/branding \
-H 'Authorization: Bearer sk_live_xxx' \
-H 'Content-Type: application/json' \
-d '{
"primaryColor": "#6366f1",
"borderRadius": "0.5rem",
"fontFamily": "Inter, sans-serif",
"logoUrl": "https://cdn.example.com/logo.svg"
}'Validation boundary
- The branding schema accepts only the seven fields listed above; custom CSS is not accepted.
@importandurl()CSS processing is not implemented because the endpoint accepts no stylesheet.- Values are stored as strings; color, radius, font, and URL syntax are not validated beyond JSON types.
- Iframe preview and separate draft and published states are not implemented.
Email template boundary
Transactional email uses built-in Mustache templates and global R2 locale packs. Per-organization HTML template upload and automatic branding injection are not implemented.