API reference
Workflows API reference descriptions are provided in English to preserve the exact published contract.
List workflow automations Create a draft workflow automation Get a workflow and its latest definition Delete a workflow that is not published Stop a workflow for one contact without stopping the workflow Resume a workflow for one stopped contact Publish a workflow automation List durable workflow runs and outcomes Stop one durable workflow run without stopping the workflow Stop a workflow automation Start an isolated workflow test run Create an immutable workflow version List workflow automations GET /v1/accounts/{AC}/workflows
getV1AccountsByAcWorkflowsPaginated 200
Required scope: `inboxes:read`.
Parameters
Parameters Name Type Required Description limitquery · integer (1–100) cursorquery · string (max 2048 chars) ACpath · string (AC… SID) yes Account SID
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Create a draft workflow automation POST /v1/accounts/{AC}/workflows
postV1AccountsByAcWorkflowsIdempotency-Key required 201
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID
Request body (7 fields) Request body Name Type Required Description definitionobject yes definition.actionsobject[] yes definition.conditionsobject[] yes definition.failureActionsobject[] definition.timeoutActionsobject[] definition.triggerobject yes namestring (max 160 chars) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Get a workflow and its latest definition GET /v1/accounts/{AC}/workflows/{WF}
getV1AccountsByAcWorkflowsByWf200
Required scope: `inboxes:read`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Delete a workflow that is not published DELETE /v1/accounts/{AC}/workflows/{WF}
deleteV1AccountsByAcWorkflowsByWf204
Removes a DRAFT or STOPPED workflow with its versions and finished runs. A PUBLISHED workflow must be stopped first; a workflow with RUNNING or WAITING runs is refused until those runs are stopped.
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Stop a workflow for one contact without stopping the workflow POST /v1/accounts/{AC}/workflows/{WF}/contacts/{CT}/stop
postV1AccountsByAcWorkflowsByWfContactsByCtStopIdempotency-Key required 200
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes CTpath · string (CT… SID) yes
Request body (1 fields) Request body Name Type Required Description reasonstring (max 500 chars)
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Resume a workflow for one stopped contact DELETE /v1/accounts/{AC}/workflows/{WF}/contacts/{CT}/stop
deleteV1AccountsByAcWorkflowsByWfContactsByCtStop204
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes CTpath · string (CT… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Publish a workflow automation POST /v1/accounts/{AC}/workflows/{WF}/publish
postV1AccountsByAcWorkflowsByWfPublishIdempotency-Key required 200
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
List durable workflow runs and outcomes GET /v1/accounts/{AC}/workflows/{WF}/runs
getV1AccountsByAcWorkflowsByWfRunsPaginated 200
Required scope: `inboxes:read`.
Parameters
Parameters Name Type Required Description limitquery · integer (1–100) cursorquery · string (max 2048 chars) ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Stop one durable workflow run without stopping the workflow POST /v1/accounts/{AC}/workflows/{WF}/runs/{WR}/stop
postV1AccountsByAcWorkflowsByWfRunsByWrStopIdempotency-Key required 200
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes WRpath · string (WR… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Stop a workflow automation POST /v1/accounts/{AC}/workflows/{WF}/stop
postV1AccountsByAcWorkflowsByWfStopIdempotency-Key required 200
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Start an isolated workflow test run POST /v1/accounts/{AC}/workflows/{WF}/test
postV1AccountsByAcWorkflowsByWfTestIdempotency-Key required 201
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Request body (5 fields) Request body Name Type Required Description contactSidstring (CT… SID) conversationSidstring (CO… SID) eventTypestring (pattern ^[A-Z][A-Z0-9_]{2,63}$) yes messageSidstring (SM… SID) payloadobject
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Create an immutable workflow version POST /v1/accounts/{AC}/workflows/{WF}/versions
postV1AccountsByAcWorkflowsByWfVersionsIdempotency-Key required 201
Required scope: `inboxes:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes WFpath · string (WF… SID) yes
Request body (8 fields) Request body Name Type Required Description actionsobject[] yes conditionsobject[] yes failureActionsobject[] timeoutActionsobject[] triggerobject yes trigger.allowReentryboolean trigger.eventTypesstring (pattern ^[A-Z][A-Z0-9_]{2,63}$)[] yes trigger.timeoutSecondsinteger (1–2592000)
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .