# Save an organisation's brand theme

> Page: https://docs.plotwork.dev/api/put-orgs-org-brand. Index of every page: https://docs.plotwork.dev/llms.txt

Saves one to three colors.

`PUT /orgs/{org}/brand`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Save an organisation's brand theme. |
| What does it take? | A JSON body of type [`BrandBody`](https://docs.plotwork.dev/api/schemas.md#brandbody). |
| What does it return? | Status 200 with a body of type [`SavedBrand`](https://docs.plotwork.dev/api/schemas.md#savedbrand). |
| What can go wrong? | `400` the body is not valid; `401` not signed in; `403` the caller's role may not (orgs.forbidden), the owner's plan does not include brand themes (plan.brand_not_included), or the request came from an origin that may not make changes; `404` no such organisation, or the caller is not a member of it; `422` a color is not valid, or there is no primary (brand.invalid, with every issue in details); `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

Saves one to three colors. The hosted service paints every diagram it draws for the organisation in a palette made from them; status colors and official cloud icons never change. The owner and admins may, on a plan with brand themes. 422 brand.invalid carries every issue of the check.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |

## Request body

The body has the type [`BrandBody`](https://docs.plotwork.dev/api/schemas.md#brandbody).

| Field | Type | Required | Description |
|---|---|---|---|
| `primary` | `string \| null` | no | The main brand color, as #rrggbb or #rgb in any case. Takes the place of the blue tone. A brand needs one. at most 32 characters. |
| `secondary` | `string \| null` | no | Takes the place of the violet tone. Left out or null, it is made from the primary by turning its hue, and follows the primary. at most 32 characters. |
| `accent` | `string \| null` | no | Takes the place of the aqua tone. Left out or null, it is made from the primary by turning its hue, and follows the primary. at most 32 characters. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The saved brand and its check. | [`SavedBrand`](https://docs.plotwork.dev/api/schemas.md#savedbrand) |
| 400 | The body is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The caller's role may not (orgs.forbidden), the owner's plan does not include brand themes (plan.brand_not_included), or the request came from an origin that may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, or the caller is not a member of it. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 422 | A color is not valid, or there is no primary (brand.invalid, with every issue in details). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`SavedBrand`](https://docs.plotwork.dev/api/schemas.md#savedbrand).

| Field | Type | Required | Description |
|---|---|---|---|
| `brand` | `any` | yes |  |
| `brand.primary` | `string` | yes | Lowercase #rrggbb. |
| `brand.secondary` | `string` | yes | Lowercase #rrggbb. |
| `brand.accent` | `string` | yes | Lowercase #rrggbb. |
| `chosen` | `("primary" \| "secondary" \| "accent")[]` | yes |  |
| `check` | `BrandCheck` | yes |  |
| `check.issues` | `BrandIssue[]` | yes |  |
| `check.issues[].role` | `"primary" \| "secondary" \| "accent"` | yes |  |
| `check.issues[].severity` | `"error" \| "warning" \| "note"` | yes | An error stops a save. A warning and a note are advice. |
| `check.issues[].code` | `"not-a-color" \| "missing-primary" \| "reads-as-status" \| "too-similar" \| "adjusted"` | yes |  |
| `check.issues[].message` | `string` | yes |  |
| `check.swatches` | `object \| null` | yes | The color each scheme draws for each role, made darker or lighter where it would not keep 3:1 against the surface. |
| `check.swatches.light` | `object` | yes |  |
| `check.swatches.dark` | `object` | yes |  |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
