Skip to main content
POST
Start a workflow run

Authorizations

Authorization
string
header
required

Use your app's API key as the username, and leave the password blank

Headers

Idempotency-Key
string

Makes a retry safe when you never got the answer to a call: a timeout, a dropped connection, a worker that crashed. Send a new key (a UUID, say) with each request you mean to make once, and the same key when you send that request again. A repeat with the key and the same method, path, query and body answers 201 with what the first call created, as it is now, marked Idempotent-Replayed: true, and queues nothing. The same key with a different request is a 422. A key belongs to your app (sandbox and production apps never share one), lasts as long as what it created, and is 1 to 255 printable ASCII characters.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]+$

Path Parameters

connection_id
string<uuid>
required

ID of the connection

Body

application/json
workflow
string
required

The workflow's key

input
object

Matches the workflow's own input_schema

reference
string

Your own label for the run, such as the id of the record it is about: kept exactly as sent, never changed, and returned on the run and in every webhook it sends (reference), so you can match a webhook to your record before you have the run's id. Not unique -- starting two runs with one reference is allowed, and GET .../workflow-runs?reference= lists both; Idempotency-Key is what makes a start happen once. Give every run its own (order-1042-2 for a second run about order-1042): revisions count per run, so a second run's bodies, found by the first run's reference, would be skipped against the first run's revision. One that is empty, longer than 255 characters or not a string is a 422 field by field, {"errors": {"reference": [...]}}.

Required string length: 1 - 255
Example:

"order-1042"

version
string

Which chart to run: published, working or a version number. Only a choice on a sandbox connection: a production connection always runs the published version, and refuses working or a number with a 422.

webhook_url
string<uri>

An absolute http or https URL where the run's webhooks go: workflow_run.awaiting_input, its ending, and workflow_run.notification from notify states. It may not contain a username or password, and in production it may not point at localhost or a private, loopback or link-local address. A qube listen URL must be one of this app's. Required for a workflow that sends the app data (a notify state, its own or in a workflow it calls): without it, 422 webhook_url_required; one that breaks these rules is a 422 field by field, {"errors": {"webhook_url": [...]}}.

Maximum string length: 2048

Response

The run was started

data
object