Card Layouts
Endpoints for creating, updating, sharing, and importing custom card layouts.
Limits and Validation
Up to 10 layouts per user. name max 100 chars, description max 500 chars, and layoutData max 1MB.
Visibility
Layout detail access and gallery listing are controlled by the visibility field.
| Parameter | Description |
|---|---|
| private | Only the owner can view it. |
| link_shared | Anyone with the link can view it. |
| same_instance | Only logged-in users on the same instance can view it. |
| public | Anyone can view it and it appears in the gallery. |
Minimal layoutData shape
layoutData is a JSON object with version / compatibility / canvas / elements. Element details follow server-side validation.
{
"version": 1,
"compatibility": {
"minReaderVersion": 1,
"minWriterVersion": 1
},
"canvas": {
"width": 560,
"height": 275,
"backgroundColor": "#ffffff",
"borderRadius": 24
},
"elements": []
}/api/v1/card-layoutsList layouts owned by the authenticated user in descending createdAt order.
Authentication
card-layouts:readResponse
{
"layouts": [
{
"id": "cl_xxx",
"name": "My Layout",
"description": null,
"visibility": "private",
"sourceId": null,
"createdAt": "2026-03-08T12:00:00.000Z",
"updatedAt": "2026-03-08T12:00:00.000Z"
}
]
}/api/v1/card-layoutsCreate a new card layout.
Authentication
card-layouts:writeRequest Body
| Parameter | Type | Description |
|---|---|---|
| name | string | Layout name (1-100 characters) |
| description | string | null | Layout description (optional, max 500 characters) |
| layoutData | object | Layout definition with canvas and elements (JSON, max 1MB) |
| visibility | string | private / link_shared / same_instance / public (default: private) |
/api/v1/card-layouts/:idGet a card layout by ID. When authenticated, fields like isOwner / canImport / isImported are also returned.
Authentication
No authentication required (public endpoint)
private: owner only; same_instance: logged-in users on same domain only; link_shared/public: publicly accessible.
Path Parameters
| Parameter | Description |
|---|---|
| id | Layout ID |
/api/v1/card-layouts/:idUpdate an existing layout. Only provided fields are updated.
Authentication
card-layouts:writeUpdate and delete operations are owner-only.
/api/v1/card-layouts/:idDelete an existing layout. If it was active, activeCardLayoutId is also cleared.
Authentication
card-layouts:writeUpdate and delete operations are owner-only.
/api/v1/card-layouts/galleryGet shared gallery layouts. Unauthenticated users get public only; authenticated users also get same_instance.
Authentication
No authentication required (public endpoint)
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| cursor | string | Pagination cursor (question ID) from previous response |
/api/v1/card-layouts/:id/importImport a shared layout into your library. Imported layout visibility is forced to private.
Authentication
card-layouts:write