Skip to main content
Open a published workflow and expand Run via API. The panel shows the endpoint for that workflow. Requests are rejected until the workflow is Live.

How to connect

1

Create an API key

Create an API key for this workspace with the workflow run scope. Add workflow read to check status. See API keys.
2

Send headers

Send the key in the X-API-Key header, with a unique Idempotency-Key per run.
3

Pass context

Put input in context. For example phone_number becomes {{phone_number}} in later steps.
Runs start in parallel. Add a Concurrency-Key (for example a store id) to allow only one active run per key; others return 409. Optional Cooldown-Minutes (0–10080) refuses a new run for that key until this many minutes after its last run ended.

Start a run

POST https://api.persistence.dev/v1/workflows/{workflowId}/run
A successful start returns 202 with a runId in data.id.

Check status

GET https://api.persistence.dev/v1/workflows/{workflowId}/runs/{runId}
Requires the workflow read scope. Status values match the Runs tab: queued, running, waiting_call, waiting_schedule, waiting_automation, blocked, completed, failed, cancelled.

Cancel

Cancel one run: POST /v1/workflows/{workflowId}/runs/{runId}/cancel Cancel every active run, or only those that share concurrency keys: POST /v1/workflows/{workflowId}/runs/cancel
Or send "concurrencyKeys": ["store-10"] instead of "all": true. You can include an optional reason. Workflows with Send the failure webhook when a run is cancelled notify that webhook for each cancelled run.

Wake a waiting run

If a run is sleeping at a Delay (or another wait step) for a promised time, you can continue it now. Runs pausing between call retries are not woken. POST /v1/workflows/{workflowId}/runs/wake
Send 1–500 concurrency keys. The response lists the run ids that woke.

Workflows API

Request and response contracts for start, status, cancel, and wake.