Publish an automation's draft version
Promotes the current draft to the published version and installs its triggers, optionally enabling the automation or rotating its webhook signing secret at the same time. Requires the `automations:write` permission plus edit access; the draft is recompiled under stricter publish-time rules, so an automation with no unpublished changes, no steps, or an invalid graph is rejected with a validation error. 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/automations/string/publish" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "string", "workspaceId": "string", "key": "string", "label": "string", "enabled": true, "versionId": "string", "version": 0, "publishedVersionId": "string", "draftVersionId": "string", "hasUnpublishedChanges": true, "trigger": "manual", "triggerConfig": { "kind": "manual" }, "graph": { "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 } }, "webhookPath": "string", "webhookSecret": "string", "nextRunAt": "string", "lastTriggeredAt": "string", "createdAt": "string", "updatedAt": "string", "referenceIssues": [ { "nodeId": "string", "message": "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}List automation runs across the whole workspace
Returns runs for every automation in the workspace in one stream, newest first, for the workspace runs page. Requires the `automations:read` permission. Narrow the result with a comma-separated `statuses` list and page by passing `beforeStartedAt` and `beforeId` from the last row of the previous page; an unrecognized status, or one cursor field without the other, is rejected as a query validation error.
List an automation's saved versions
Returns the automation's versions, newest first; versions whose stored graph no longer compiles are omitted. Requires the `automations:read` permission plus view access to the automation.