Skip to main content
GET
These endpoints are for the VIP plan only. Other plans get a 403. See Plan access.
A run is one trip of one contact or event through a workflow.

List runs

  • GET /v1/workflows/{id}/runs: runs of one workflow.
  • GET /v1/workflows/runs: runs of every workflow in a workspace. An account key must send workspaceId. Add workflowId to see one workflow.
Both list newest first and take these query parameters:
string
One of running, waiting, completed, failed or cancelled. running includes runs that have not started.
integer
default:"50"
How many to return, 1 to 100.
integer
default:"0"
How many to skip.
Response
A run’s status is pending, running, waiting, completed, failed or cancelled. A run’s triggerType is what started it: contact_created, contact_tagged, contact_tag_added, contact_tag_removed, call_completed, conversation_completed, conversation_started, contact_replied, webhook, schedule, pipedrive_person_updated, or manual for a contact you enrolled.

Get a run

GET /v1/workflows/{id}/runs/{runId} One run with the result of each step it reached.
Response
A step’s name is the name it has in the dashboard editor. A step with no name there shows its id. errorMessage is a plain line. Some errors have their own line, like “The contact has DND on.” or “The contact has no phone number.” Every other error reads “This step could not finish.” We never send the raw error text. The step that failed has the same line as the run.

Cancel a run

POST /v1/workflows/{id}/runs/{runId}/cancel Stop a run that has not finished. It answers with the run’s id, workflowId, status and completedAt. A run that has finished gets 409.

Retry a run

POST /v1/workflows/{id}/runs/{runId}/retry Resume a failed run from the step that failed last. Steps that finished before it do not run again, and the run keeps its id. It answers 200 with the run’s id, workflowId and status, which is running. The failed step runs again. So a step that may already have sent its message or call can’t be retried. That is a step that timed out, failed after it started sending, or placed a call that got no answer back. A webhook your endpoint refused can be retried. That is a 4xx error other than 408 or 429, or a redirect we could not follow. It will be sent again. A webhook that got a 5xx, 408 or 429 answer, or no answer in time, can’t be retried. These runs get 409:
  • A run that is not failed: cancelled, still going, already being retried, or completed.
  • A run with no failed step to resume from.
  • A run where steps ran after its failed step.
  • A run our system stopped because it stalled.
  • A run whose failed step may already have sent its message or call.
  • A run whose contact has restricted processing.

Errors