Widgets API

Create, update, publish, and manage widgets.

Widgets define how a set of assets are displayed. All management endpoints require JWT authentication.

Create widget

POST/api/projects/{projectId}/widgetsJWT

Request body

NameTypeDefaultDescription
name*stringWidget display name
slug*stringURL-friendly identifier, unique within the project. Used for public delivery.
assetIdsUUID[]Ordered list of asset IDs. The array index determines display order.
layout*stringLayout type: CAROUSEL, GRID, MASONRY, SLIDER, LIST_VERTICAL, LIST_HORIZONTAL
configobjectLayout-specific configuration
themeobjectVisual theme settings
Request
{
"name": "Hero Carousel",
"slug": "hero-carousel",
"assetIds": [
  "550e8400-e29b-41d4-a716-446655440000",
  "660e8400-e29b-41d4-a716-446655440001"
],
"layout": "CAROUSEL",
"config": {
  "autoplay": true,
  "autoplaySpeed": 3000,
  "showDots": true,
  "infinite": true
},
"theme": {
  "borderRadius": 12,
  "padding": 8
}
}

Response 201

Response
{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"projectId": "770e8400-e29b-41d4-a716-446655440000",
"assetIds": [
  "550e8400-e29b-41d4-a716-446655440000",
  "660e8400-e29b-41d4-a716-446655440001"
],
"name": "Hero Carousel",
"slug": "hero-carousel",
"layout": "CAROUSEL",
"config": "{"autoplay":true,"autoplaySpeed":3000,"showDots":true,"infinite":true}",
"theme": "{"borderRadius":12,"padding":8}",
"status": "DRAFT",
"createdAt": "2026-01-15T10:30:00",
"updatedAt": "2026-01-15T10:30:00"
}

List widgets

GET/api/projects/{projectId}/widgetsJWT

Response 200

Returns an array of widget objects.

Get widget

GET/api/projects/{projectId}/widgets/{widgetId}JWT

Response 200

Returns the widget object.

Update widget

PUT/api/projects/{projectId}/widgets/{widgetId}JWT

Request body

NameTypeDefaultDescription
name*stringUpdated widget name
assetIdsUUID[]Updated ordered list of asset IDs. Replaces the existing list.
layout*stringUpdated layout type
configobjectUpdated layout configuration
themeobjectUpdated theme settings

Response 200

Returns the updated widget object.

Delete widget

DELETE/api/projects/{projectId}/widgets/{widgetId}JWT

Response 204

No content.

List widget assets

GET/api/projects/{projectId}/widgets/{widgetId}/assetsJWT

Response 200

Returns an ordered array of asset objects belonging to the widget.

Add assets to widget

POST/api/projects/{projectId}/widgets/{widgetId}/assetsJWT

Request body

NameTypeDefaultDescription
assetIds*UUID[]Asset IDs to add to the widget

Response 200

Returns the updated list of asset objects.

Remove asset from widget

DELETE/api/projects/{projectId}/widgets/{widgetId}/assets/{assetId}JWT

Response 204

No content.

Publish widget

Make a widget publicly accessible via the delivery API.

PUT/api/projects/{projectId}/widgets/{widgetId}/publishJWT

Response 200

Returns the widget object with status: "PUBLISHED".

Unpublish widget

Remove public access to a widget.

PUT/api/projects/{projectId}/widgets/{widgetId}/unpublishJWT

Response 200

Returns the widget object with status: "DRAFT".

Unpublishing immediately makes the widget inaccessible. Connected apps will receive a 404 error.