Save an automation version as a reusable template
Stores the trigger and graph of an automation version as a workspace template under the given name, description, and category. Requires the `automations:write` permission plus view access to the source automation; an automation with no version, an unknown `versionId`, a blank name, or a graph that no longer compiles is rejected with a validation error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringapplication/json- body
automationId*stringversionId?string|nullname*stringdescription?string|nullcategory?string|nullSuccess
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/automation-templates' \ -H 'Content-Type: application/json' \ -d '{ "automationId": "string", "name": "string"}'{ "data": { "id": "string", "scope": "builtin", "name": "string", "description": "string", "category": "string", "trigger": { "kind": "manual" }, "graph": { "reusable": { "inputs": [ { "key": "string", "label": "string", "type": "text", "required": true } ], "outputs": [ { "key": "string", "label": "string", "type": "text", "required": true, "value": { "type": "literal", "value": null } } ] }, "nodes": [ { "id": "string", "label": "string", "retry": { "maxAttempts": 0, "initialDelaySeconds": 0, "backoffMultiplier": 0, "maxDelaySeconds": 0 }, "position": { "x": 0, "y": 0 }, "kind": "action", "actionId": "string", "input": { "property1": { "type": "literal", "value": null }, "property2": { "type": "literal", "value": null } } } ], "edges": [ { "id": "string", "from": "string", "to": "string", "outcome": "always" } ], "entryNodeIds": [ "string" ], "testPayloads": [ { "id": "string", "name": "string", "payload": {} } ], "failureAutomationId": "string", "triggerPosition": { "x": 0, "y": 0 } }, "createdAt": "string" }}List the automation templates available to the workspace
Returns the built-in automation templates followed by the workspace's own saved ones, newest first; templates whose stored graph no longer compiles are omitted. Requires the `automations:read` permission in the workspace.
Delete a saved automation template
Deletes one of the workspace's own automation templates. Requires the `automations:write` permission; the built-in templates are not workspace rows and cannot be deleted, and an unknown template id is rejected with a validation error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.