User Settings and Themes
Base path: /api
User-scoped settings and AdminJS theme management. These endpoints operate on the authenticated user (not tenant-scoped).
Auth: Session cookie required for all endpoints. Unauthenticated requests return 401.
GET /settings
Get the current user's settings.
Auth: Session cookie required
Response (200)
{
"id": "...",
"userId": "...",
"displayName": "Admin User",
"activeThemeId": "theme-id-or-null",
"notifications": {},
"createdAt": "...",
"updatedAt": "..."
}
Errors
| Status | Condition |
|---|---|
| 401 | Unauthenticated |
| 500 | Server error |
PATCH /settings
Update the current user's settings.
Auth: Session cookie required
Body
| Field | Type | Required | Description |
|---|---|---|---|
| displayName | string | No | Display name |
| activeThemeId | string | No | ID of the theme to activate |
| notifications | object | No | Notification preferences |
Response (200)
Returns the updated settings object (same shape as GET /settings).
Errors
| Status | Condition |
|---|---|
| 400 | Invalid body |
| 401 | Unauthenticated |
| 500 | Server error |
PATCH /settings/theme
Set the active AdminJS theme for the current user.
Auth: Session cookie required
Body
| Field | Type | Required | Description |
|---|---|---|---|
| themeId | string | Yes | Theme ID to activate |
Response (200)
Returns the updated settings object.
Errors
| Status | Condition |
|---|---|
| 400 | Missing or empty themeId |
| 401 | Unauthenticated |
| 500 | Server error |
GET /themes
List themes available to the current user (system themes plus any custom themes owned by the user).
Auth: Session cookie required
Response (200)
Array of theme objects:
[
{
"id": "...",
"name": "Default",
"slug": "default",
"ownerUserId": null,
"isSystem": true,
"baseThemeId": null,
"overrides": {},
"createdAt": "...",
"updatedAt": "..."
}
]
Errors
| Status | Condition |
|---|---|
| 401 | Unauthenticated |
| 500 | Server error |
GET /themes/:id
Get a single theme by ID.
Auth: None required (themes are readable by authenticated users)
Response (200)
Theme object (same shape as items in GET /themes list).
Errors
| Status | Condition |
|---|---|
| 404 | Theme not found |
| 500 | Server error |
POST /themes
Create a new custom theme for the current user.
Auth: Session cookie required
Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Display name for the theme |
| baseThemeId | string | No | ID of a theme to extend (optional) |
| overrides | object | No | Theme overrides (colors, spacing, etc.) |
Response (201)
Created theme object.
Errors
| Status | Condition |
|---|---|
| 400 | Missing name or invalid body |
| 401 | Unauthenticated |
| 500 | Server error |
POST /themes/:id/copy
Copy a theme with a new name. Creates a new custom theme owned by the current user.
Auth: Session cookie required
Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name for the copy |
Response (201)
Created theme object.
Errors
| Status | Condition |
|---|---|
| 400 | Missing name |
| 401 | Unauthenticated |
| 500 | Server error |
PATCH /themes/:id
Update a custom theme. Only the theme owner can update it.
Auth: Session cookie required
Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | No | Display name |
| overrides | object | No | Theme overrides |
Response (200)
Updated theme object.
Errors
| Status | Condition |
|---|---|
| 400 | Invalid body or not theme owner |
| 401 | Unauthenticated |
| 500 | Server error |
DELETE /themes/:id
Delete a custom theme. Only the theme owner can delete it. System themes cannot be deleted.
Auth: Session cookie required
Response (200)
{ "ok": true }
Errors
| Status | Condition |
|---|---|
| 400 | Cannot delete (system theme or not owner) |
| 401 | Unauthenticated |
| 500 | Server error |
Related
- User Management — Admin panel user accounts
- Themes and Settings — User guide for customizing the admin UI