From ee9277d092f4ef71f4a0d90c8cf8b79b64459d57 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 07:21:16 +0000 Subject: [PATCH] docs: document API key auth for color palette endpoints --- ...omizing-the-appearance-of-your-project.mdx | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/references/workspace/customizing-the-appearance-of-your-project.mdx b/references/workspace/customizing-the-appearance-of-your-project.mdx index 0ea345ed..809e5ba2 100644 --- a/references/workspace/customizing-the-appearance-of-your-project.mdx +++ b/references/workspace/customizing-the-appearance-of-your-project.mdx @@ -55,3 +55,37 @@ Open the dashboard settings modal to pick a palette for a dashboard. Tiles in th ### Setting a chart-level palette In the chart editor, the palette picker is at the top of the **Series** tab (cartesian and pie charts) and the **Steps** tab (funnel charts). The preview reflects the staged palette before you save; the override only persists when you click **Save changes**. + +## Managing color palettes via the API + +You can create, update, delete, and set the active color palette through the Lightdash API. These endpoints accept either a logged-in session or a [personal access token](/references/workspace/personal-tokens), which lets you manage palettes from scripts, CI jobs, or other automations without a browser session. + +All endpoints live under `/api/v1/org/color-palettes` and require organization admin permissions: + +| Method | Endpoint | Purpose | +| -------- | ---------------------------------------------- | ------------------------------------ | +| `POST` | `/color-palettes` | Create a new palette | +| `PATCH` | `/color-palettes/{colorPaletteUuid}` | Update an existing palette | +| `DELETE` | `/color-palettes/{colorPaletteUuid}` | Delete a palette | +| `POST` | `/color-palettes/{colorPaletteUuid}/active` | Set a palette as the active palette | + +Pass your token in the `Authorization` header as `ApiKey ldpat_{{your_personal_access_token}}`. + +```bash Create a color palette +curl -X POST \ + -H "Authorization: ApiKey ldpat_{{your_personal_access_token}}" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Brand palette", + "colors": ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"] + }' \ + https://{{your_lightdash_url}}/api/v1/org/color-palettes +``` + +```bash Set a palette as active +curl -X POST \ + -H "Authorization: ApiKey ldpat_{{your_personal_access_token}}" \ + https://{{your_lightdash_url}}/api/v1/org/color-palettes/{{colorPaletteUuid}}/active +``` + +See the [API reference](/api-reference/v1/introduction) for full request and response schemas.