Create Workflow
POST/api/automation/workflows
Create a new workflow in Draft status from a node/edge graph. The workflow's trigger type is derived automatically from the trigger node in the graph.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Body fields: name (required, string, max 128), description (optional), category (optional, string, max 50), nodes (required array - may be empty while drafting), edges (required array), viewport (optional canvas position object), preview_mode (optional boolean, default false).
Use List Workflow Node Types to discover valid nodes[*].type values and each node's settings. Draft workflows are not executable until published.
Preview mode: preview_mode (optional, boolean, default false). While a workflow is in preview mode every run — triggered, manual, or replayed — executes triggers, conditions, and lookups for real but skips every step that would change something (all Action and Integration nodes: emails, Slack messages, webhooks, spreadsheet writes, order updates). Skipped steps are recorded in the execution with the input they would have used, so a preview run reads exactly like a real one. Read-only actions are exempt and still run.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.