SnozeDevelopers
API referenceTemplates

Update a template's metadata

Changes name, description, cover, icon, category, tags, or declared inputs. The manifest is write-once, so re-exporting a subtree creates a new template instead; setting `visibility` to `public` is refused because publication is its own permissioned verb. Requires `resources:write` in the workspace, and an unknown template returns not-found. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

PATCH
/v1/workspaces/{workspaceId}/templates/{templateId}
AuthorizationBearer <token>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

In: header

Path Parameters

workspaceId*string
templateId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/workspaces/string/templates/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "string",    "workspaceId": "string",    "name": "string",    "description": "string",    "cover": "string",    "icon": "string",    "kind": "folder",    "sourceItemId": "string",    "scope": "builtin",    "visibility": "private",    "reviewStatus": "draft",    "installCount": 0,    "author": {      "workspaceId": "string",      "name": "string",      "icon": "string"    },    "category": "string",    "tags": [      "string"    ],    "inputs": [      {        "id": "string",        "kind": "database",        "label": "string",        "description": "string",        "placeholder": "string",        "required": true,        "dependsOn": "string",        "choices": [          {            "value": "string",            "label": "string"          }        ],        "default": "string"      }    ],    "version": 0,    "manifest": {      "version": 2,      "inputs": [        {          "id": "string",          "kind": "database",          "label": "string",          "description": "string",          "placeholder": "string",          "required": true,          "dependsOn": "string",          "choices": [            {              "value": "string",              "label": "string"            }          ],          "default": "string"        }      ],      "rootSourceItemId": "string",      "rootKind": "folder",      "operations": [        {          "type": "item.create",          "sourceItemId": "string",          "parentSourceItemId": "string",          "title": "string",          "icon": "string",          "color": "string",          "order": 0,          "accessMode": "open",          "locked": true,          "archived": true,          "metadata": {},          "kind": "folder",          "sourceTargetId": "string"        }      ]    },    "publishedAt": "string",    "curatedAt": "string",    "submittedAt": "string",    "reviewNote": "string",    "createdBy": "string",    "createdAt": "string",    "updatedAt": "string"  }}