Contents

API reference

Workflows

API reference descriptions are provided in English to preserve the exact published contract.

List workflow automations

GET /v1/accounts/{AC}/workflows

Required scope: `inboxes:read`.

Parameters

Parameters
NameTypeRequiredDescription
limitquery · integer (1–100)
cursorquery · string (max 2048 chars)
ACpath · string (AC… SID)yesAccount SID

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Create a draft workflow automation

POST /v1/accounts/{AC}/workflows

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount SID
Request body (7 fields)
Request body
NameTypeRequiredDescription
definitionobjectyes
definition.actionsobject[]yes
definition.conditionsobject[]yes
definition.failureActionsobject[]
definition.timeoutActionsobject[]
definition.triggerobjectyes
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}

Required scope: `inboxes:read`.

Parameters

Parameters
NameTypeRequiredDescription
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}

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
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
WFpath · string (WF… SID)yes
CTpath · string (CT… SID)yes
Request body (1 fields)
Request body
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
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

Required scope: `inboxes:read`.

Parameters

Parameters
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
WFpath · string (WF… SID)yes
Request body (5 fields)
Request body
NameTypeRequiredDescription
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

Required scope: `inboxes:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
WFpath · string (WF… SID)yes
Request body (8 fields)
Request body
NameTypeRequiredDescription
actionsobject[]yes
conditionsobject[]yes
failureActionsobject[]
timeoutActionsobject[]
triggerobjectyes
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.