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.

ParameterDescription
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": []
}
GET/api/v1/card-layouts

List layouts owned by the authenticated user in descending createdAt order.

Authentication

card-layouts:read

Response

{
  "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"
    }
  ]
}
POST/api/v1/card-layouts

Create a new card layout.

Authentication

card-layouts:write

Request Body

ParameterTypeDescription
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)
GET/api/v1/card-layouts/:id

Get 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

ParameterDescription
id Layout ID
PUT/api/v1/card-layouts/:id

Update an existing layout. Only provided fields are updated.

Authentication

card-layouts:write

Update and delete operations are owner-only.

DELETE/api/v1/card-layouts/:id

Delete an existing layout. If it was active, activeCardLayoutId is also cleared.

Authentication

card-layouts:write

Update and delete operations are owner-only.

POST/api/v1/card-layouts/:id/import

Import a shared layout into your library. Imported layout visibility is forced to private.

Authentication

card-layouts:write