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

Update Template

Replace a workspace template with a new template document.

This endpoint requires a dashboard session; API-key authentication is not accepted.

Update an editable workspace template.

Endpoint

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

Request

curl -X PATCH "https://api.pixmato.com/v1/templates/YOUR_TEMPLATE_ID" \
  -H "Cookie: __Secure-better-auth.session_token=..." \
  -H "Content-Type: application/json" \
  -d '{
    "template": {
      "version": 1,
      "id": "YOUR_TEMPLATE_ID",
      "name": "Product Promo Story",
      "pages": [
        {
          "id": "page-1",
          "name": "Page 1",
          "canvas": {
            "width": 1080,
            "height": 1920,
            "backgroundColor": "#ffffff"
          },
          "elements": [],
          "parameters": []
        }
      ],
      "parameters": [],
      "assets": []
    }
  }'

Body

Field Type Required Description
template object Yes Complete template document.

Response

The example below shows selected response fields.

{
  "template": {
    "id": "YOUR_TEMPLATE_ID",
    "name": "Product Promo Story"
  },
  "version": 8
}

Notes

  • Updating a template creates a new template version.
  • The API regenerates the workspace template thumbnail after a successful update.
  • Only workspace templates can be updated.

Was this page helpful?