Workflows

Start a run

Starts a run of the active workflow for a contact (contact_id or email; none only for a schedule without a segment). An Idempotency-Key starts at most one run per key: a repeat answers the same run. Re-entry and the throttle apply (a refused start answers 400 with the reason); past limits.toml [workflows] max_concurrent_per_project runs under way the answer is 429 with Retry-After (nothing started: retry with the same key).

POST
/workflows/{id}/runs

Starts a run of the active workflow for a contact (contact_id or email; none only for a schedule without a segment). An Idempotency-Key starts at most one run per key: a repeat answers the same run. Re-entry and the throttle apply (a refused start answers 400 with the reason); past limits.toml [workflows] max_concurrent_per_project runs under way the answer is 429 with Retry-After (nothing started: retry with the same key).

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key?|

Starts at most one run per key

Request Body

application/json
  1. body
contact_id?|

The contact, by id; or email.

Formatuuid
data?|

Data for the run (trigger.data), passed to its webhook steps.

email?string|null

Response Body

Success

application/json
  1. response

A run: one contact (none for a scheduled run without a segment) through one version.

contact_id?|
Formatuuid
created_at*string
current_step?|

The step it is at (none once ended).

end_reason?string|null
ended_at?string|null
id*string
Formatuuid
object*string
status*string

running, waiting, completed, canceled or failed.

steps?array<>|

Its timeline, in single reads only.

trigger*

What started it (the event, the signal, the schedule's fire, the API's data).

updated_at*string
version*integer
Formatint32
workflow_id*string
Formatuuid
Example Request
curl -X POST 'https://api.exx.sh/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/runs' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598",  "created_at": "string",  "current_step": "string",  "end_reason": "string",  "ended_at": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "object": "string",  "status": "string",  "steps": [    {      "execution": 0,      "finished_at": "string",      "kind": "string",      "outcome": "string",      "result": {},      "started_at": "string",      "status": "string",      "step_id": "string"    }  ],  "trigger": {},  "updated_at": "string",  "version": 0,  "workflow_id": "03e70e31-d7a4-4401-a629-6a4b6096cdfe"}