---
title: "Read a brand's colours for the theme editor"
type: reference
method: POST
path: /rest-api/white-label/brand-palette.do
tag: "White Label"
---

# Read a brand's colours for the theme editor

`POST https://YOUR-NETWORK-DOMAIN/rest-api/white-label/brand-palette.do`

Answers the colours of the brand in what you send - its guideline (a PDF, an image of it, a link to its brand page, or its text), or only the brand's name as text - each as a hex value with the role the brand gives it, the primary first. Colours are never a finished theme: the editor builds both palettes from them and adjusts each one until it clears its WCAG contrast floor. The values STATED in a document are read arithmetically and no model is called at all (readBy VALUES, nothing billed); the model is asked only when there is no value to read (readBy MODEL, billed like an AI assistant call). Nothing is saved: the theme is stored only when the operator saves it. Send exactly one of file, url or text. Requires the WHITE_LABEL admin permission, and an Anthropic key for the readings that need the model: the user's own, the network's, or Epom's while the network's plan includes it.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `url` | string | no | `https://www.example.com/brand/colours` | A public http(s) link to the brand's page or its guideline PDF |
| `text` | string | no | `Northwind Coffee` | The brand's name, or the text of its guideline; up to 150,000 characters are read |

## Body

A multipart form: `file` (file).

## Responses

- `200` — {brands: [{brand, source, notes, readBy, colors: [{hex, role, name}]}], total, more, document: {kind, origin}}
- `400` — Field errors under 'errors': none or several of file, url and text; the document empty, too large, of a type that cannot be read, without readable text, not downloadable, without a brand's colours in it, too long to read in one answer, or declined by the model (errors.document)
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `429` — This month's AI budget is spent
- `503` — No Anthropic key is set up, or the model could not be reached or answered something that cannot be read; try again

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/white-label/brand-palette.do?url=https%3A%2F%2Fwww.example.com%2Fbrand%2Fcolours&text=Northwind%20Coffee' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'file=@data.csv'
```

Source: https://epom.com/ad-server/docs/api/white-label/post-white-label-brand-palette