Start a run
Start one contact's run on a published version.
Start one contact's run on a published version. The wallet and every agent the version calls are asked
first (402; 409 with 1202 / 1203). A contact already running this workflow (by reference_id, default
its number) is refused (409).
Rate limit: 2000 requests per minute per organization, counted together with every endpoint that has no stricter limit of its own. Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.
v2/workflows/{workflow_id}/runsAuthorization
AuthorizationRequiredBearer <token>
Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.
In: header
Request Body
application/jsonRequiredcontactRequiredContact
The contact: mobile_number, and the fields the workflow's start step declares (reference_id, name and email are always accepted).
versionVersion | null
The version to run; the latest when omitted.
1Path Parameters
workflow_idRequiredWorkflow Id
The workflow's id.
Response Body
201
The run, moving.
idRequiredId
The run's id.
workflow_idRequiredWorkflow Id
Its workflow.
versionRequiredVersion
The version it runs.
campaign_idCampaign Id | null
Its campaign, if any.
sourceSource | null
How it started: dashboard | api | campaign | trigger.
statusRequiredStatus
queued | running | waiting | ended | failed | cancelled.
nodeNode | null
The step it is on.
outcomeOutcome | null
success | failure | neutral, once ended.
labelLabel | null
The ending's label.
termination_reasonTermination Reason | null
Why it ended.
warningsRequiredWarnings
Optional values that were missing.
reference_idReference Id | null
The contact's reference.
waitAny properties in WorkflowRunWait
created_atCreated At | null
When it started.
updated_atUpdated At | null
When it last moved.
ended_atEnded At | null
When it ended.
last_eventLast Event | null
Its latest step, on a list.
variablesRequiredVariables
entry, run, call, extraction, response, callback, state, node.
timelineRequiredTimeline
Every step, oldest first (the last 500).
401
1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented instead of an API key.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
402
1400 — your credit balance cannot fund this call. Top up and retry.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
403
1102 — the key is valid but lacks the scope this endpoint requires, or names another organization. GET /v2/scopes reports what a key holds.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
404
1200 — no such resource in your organization. A resource belonging to another organization answers 404, never 403.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
409
1201 — the resource's current state does not allow this action.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
422
1001 — the body or query failed validation; the message names the first offending field.
errorRequiredinteger
Stable integer code from the error table. Branch on this, not on the message.
messageRequiredstring
One human-readable sentence. Wording may change; the code will not.
429
1300 — the per-organization request rate or concurrent-call limit was reached. Carries Retry-After.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
503
1501 — a service this endpoint depends on is unreachable or returned a 5xx.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
The run, moving.

