Skip to content
Pixmato
Esc
↑↓navigate↵open⌘Jpreview
On this page

Get Template

Fetch one template and its API parameters.

Return one renderable template by ID.

Endpoint

GET https://api.pixmato.com/v1/templates/:id

Request

curl "https://api.pixmato.com/v1/templates/YOUR_TEMPLATE_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

The example below shows selected fields from the complete template document.

{
  "id": "YOUR_TEMPLATE_ID",
  "thumbnailUrl": "https://storage.pixmato.com/workspaces/ws_01/templates/YOUR_TEMPLATE_ID/thumbnail.png",
  "fields": [
    {
      "key": "headline",
      "label": "Headline",
      "type": "text",
      "required": true,
      "default": "Glow, bottled.",
      "example": "Glow, bottled."
    },
    {
      "key": "price_block",
      "label": "Price block",
      "type": "boolean",
      "required": false,
      "default": true,
      "example": true
    }
  ],
  "template": {
    "id": "YOUR_TEMPLATE_ID",
    "name": "Product Promo Story",
    "pages": [
      {
        "id": "page-1",
        "name": "Page 1",
        "canvas": { "width": 1080, "height": 1920 }
      }
    ],
    "parameters": [
      {
        "key": "headline",
        "label": "Headline",
        "type": "text",
        "required": true,
        "targetElementId": "headline",
        "targetProperty": "content"
      }
    ]
  }
}

Parameters

Use the returned fields array to build forms, validate payloads, and generate API examples. It lists every key a render accepts in modifications, with its type (text, number, image, color, boolean or select), whether it is required, its default, and the allowed options for a select. It includes the on/off field of each named group, which is not stored in template.parameters.

Was this page helpful?