Workflows
Deploy workflow
Make a version live (the latest when none is given) and set up its triggers for it in the same request: webhooks, schedules, email, Gmail, queue consumers and sync triggers start using this version.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
workflow_id*stringThe workflow.
uuidregion*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"Idempotency-Key?|Makes the create retry-safe for 24 hours: a retry with the same key answers the resource the first call created, with the Idempotent-Replayed: true header, and creates nothing. 1 to 255 visible ASCII characters. The same key with a different request answers 422; while the first call still runs, 409.
nullapplication/json- body
version?|The version deployed; the latest when absent
nullvalidate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
falseCreated
application/json- response
workflow_id*Workflow Idregion*Regions"besg""usnv"version*A version without its document; step_ids lists its steps (workflow_module_instance_id)
triggers*array<>curl -X POST 'https://api.stacksync.com/v1/workspaces/0/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/deployments?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "version": "<version>"}'{ "workflow_id": "<workflow_id>", "region": "besg", "version": { "workflow_version": "<workflow_version>", "is_draft": false, "is_deployed": false, "last_modified_time": "<last_modified_time>", "step_ids": [ "<step_ids>" ] }, "triggers": [ { "step_id": "<step_id>", "status": "succeeded", "msg": "<msg>" } ]}POSTRun workflow
Run a workflow now from its input step's test data, replay a finished run (all steps, failed steps, failed steps and the steps after them, up to a step, from a step), or run one step. Follow the run with list-logs.
POSTDuplicate workflow
Copy a version of a workflow into a new workflow (its first draft), in the same or another region, with its schedules.