Publish an approved template to the store
Snapshots the current manifest as a new listing version and makes the template publicly visible, optionally updating its category and tags. Requires `templates:publish` in the owning workspace, and only a template whose review status is `approved` may be published — submit it for review first. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/workspaces/string/templates/string/publish" \ -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" }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Delete a template
Removes a workspace-owned template and records the deletion on the workspace event ledger; items already created from it are untouched. 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.
Submit a template for review
Moves a template from `draft` or `rejected` into `submitted` and clears any previous review note. Requires `templates:publish` in the owning workspace; a template in any other review state is rejected. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.