Skip to main content

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

StatusCondition
401Unauthenticated
500Server error

PATCH /settings

Update the current user's settings.

Auth: Session cookie required

Body

FieldTypeRequiredDescription
displayNamestringNoDisplay name
activeThemeIdstringNoID of the theme to activate
notificationsobjectNoNotification preferences

Response (200)

Returns the updated settings object (same shape as GET /settings).

Errors

StatusCondition
400Invalid body
401Unauthenticated
500Server error

PATCH /settings/theme

Set the active AdminJS theme for the current user.

Auth: Session cookie required

Body

FieldTypeRequiredDescription
themeIdstringYesTheme ID to activate

Response (200)

Returns the updated settings object.

Errors

StatusCondition
400Missing or empty themeId
401Unauthenticated
500Server 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

StatusCondition
401Unauthenticated
500Server 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

StatusCondition
404Theme not found
500Server error

POST /themes

Create a new custom theme for the current user.

Auth: Session cookie required

Body

FieldTypeRequiredDescription
namestringYesDisplay name for the theme
baseThemeIdstringNoID of a theme to extend (optional)
overridesobjectNoTheme overrides (colors, spacing, etc.)

Response (201)

Created theme object.

Errors

StatusCondition
400Missing name or invalid body
401Unauthenticated
500Server 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

FieldTypeRequiredDescription
namestringYesName for the copy

Response (201)

Created theme object.

Errors

StatusCondition
400Missing name
401Unauthenticated
500Server error

PATCH /themes/:id

Update a custom theme. Only the theme owner can update it.

Auth: Session cookie required

Body

FieldTypeRequiredDescription
namestringNoDisplay name
overridesobjectNoTheme overrides

Response (200)

Updated theme object.

Errors

StatusCondition
400Invalid body or not theme owner
401Unauthenticated
500Server 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

StatusCondition
400Cannot delete (system theme or not owner)
401Unauthenticated
500Server error