Change the fonts and the sign-in background
Changes the fonts, the sign-in page background or both, and returns the brand. A field left out keeps its value.
Runs the real call on your workspace.
PATCH /branding
Changes the fonts, the sign-in page background or both, and returns the brand. A field left out keeps its value.
The request
Parameters
fontsobject- The fonts to change, as `primary`, `secondary` or both. Each is a font id or null for the default, and a font left out keeps its value.
loginBackgroundobject | null- The sign-in page background, replacing the one there was, or null for the default. `kind` is `preset`, `color` or `image`. `preset` is one of `dusk`, `mist`, `sand`, `night` and is required for `kind: "preset"`. `color` is `#` and six hex digits and is required for `kind: "color"`. The value for the other kind may be sent too and is kept, so switching back restores it.
Example
Needs settings:write and a key with no address or domain restriction.
curl -X PATCH "$OE/branding" -H "$AUTH" -H "Content-Type: application/json" \ -d '{ "loginBackground": { "kind": "color", "preset": "dusk", "color": "#1f2937" } }'{ "object": "branding", "editable": true, "images": { "mark": "https://cdn-prod.openemail.uk/workspaces/icons/0199a1c2-7d4e-7a31-9b52-3c8e1f0a6d24.webp", "wordmark": "https://cdn-prod.openemail.uk/workspaces/wordmarks/0199a1c2-8b10-7e45-a2f1-6d9c3b7e0f58.webp", "wordmarkDark": null, "loginBackground": null }, "fonts": { "primary": "inter", "secondary": "georgia" }, "loginBackground": { "kind": "color", "preset": "dusk", "color": "#1f2937" }}kind: "image" shows the photo uploaded with PUT /branding/images/login-background, and the background reads as null until one is. Uploading one switches the page to it on its own.
A font that is not on the list, a preset background with no preset, or a colour that is not # and six hex digits answers 422 invalid_parameter, with param naming the field. A personal space answers 409 branding_unavailable.