REST API
API: Themes
Workspace dashboard themes. All endpoints require authentication unless noted. 5 endpoints, 1 of them app only: an API key gets 403 there.
GET /api/themes
Section titled “GET /api/themes”List custom dashboard themes
Responses: 200 · 400 · 401
POST /api/themes
Section titled “POST /api/themes”Create a custom dashboard theme
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
tokens |
object | yes |
Responses: 201 · 400 · 401 · 409
PUT /api/themes/{id}
Section titled “PUT /api/themes/{id}”Update a custom dashboard theme
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | no | |
tokens |
object | no |
Responses: 200 · 400 · 401 · 404
DELETE /api/themes/{id}
Section titled “DELETE /api/themes/{id}”Delete a custom dashboard theme
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Responses: 204 — No content · 401 · 404
POST /api/themes/assist
Section titled “POST /api/themes/assist”Draft a theme from a description or a brand page (AI)
App only. An API key gets 403: AI features are available in the DataSquares app; API keys can’t use them.
One metered AI call turns a description and/or a brand page URL into a brand colour, mode and eight series colours for the theme editor’s generator. The contrast gate still applies on save. 503 AI_NOT_CONFIGURED when AI isn’t set up on this server; 422 AI_ASSIST_NO_THEME when the reply holds no theme; 502 when the AI service fails.
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
prompt |
string | no | |
brandUrl |
string | no | |
mode |
"light" | "dark" | "auto" |
no |
Responses: 200