Skip to main content

Workflows

Every call needs Authorization: Bearer <key>. 8 calls:

List workflow runs, newest first​

GET /v1/workflow-runs

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
workflow_idstring (uuid)No
statusenumNoOne of: running, waiting, completed, failed, cancelled.
contact_idstringNoContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].contact_idstring or nullContact id (ctc_...).
data[].error_codestring or null
data[].finished_atstring (date-time) or nullISO 8601 timestamp.
data[].idstring (uuid)
data[].resume_atstring (date-time) or nullISO 8601 timestamp.
data[].started_atstring (date-time)ISO 8601 timestamp.
data[].statusenumOne of: running, waiting, completed, failed, cancelled.
data[].stepsobject[]
data[].steps[].atstring (date-time)ISO 8601 timestamp.
data[].steps[].detailobject
data[].steps[].node_idstring
data[].steps[].statusenumOne of: completed, skipped, failed, waiting.
data[].versionintegerFrom 1 to 9007199254740991.
data[].workflow_idstring (uuid)
data[].workflow_version_idstring (uuid)
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Get a workflow run and its steps​

GET /v1/workflow-runs/:id

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
contact_idstring or nullContact id (ctc_...).
error_codestring or null
finished_atstring (date-time) or nullISO 8601 timestamp.
idstring (uuid)
resume_atstring (date-time) or nullISO 8601 timestamp.
started_atstring (date-time)ISO 8601 timestamp.
statusenumOne of: running, waiting, completed, failed, cancelled.
stepsobject[]
steps[].atstring (date-time)ISO 8601 timestamp.
steps[].detailobject
steps[].node_idstring
steps[].statusenumOne of: completed, skipped, failed, waiting.
versionintegerFrom 1 to 9007199254740991.
workflow_idstring (uuid)
workflow_version_idstring (uuid)

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List workflows, most recently edited first​

GET /v1/workflows

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
statusenumNoOne of: draft, live, paused, archived.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].graphobject
data[].graph.edgesobject[]Up to 400 items.
data[].graph.nodesobject[]Up to 200 items.
data[].has_draftboolean
data[].idstring (uuid)
data[].namestring
data[].published_versioninteger or nullFrom 1 to 9007199254740991.
data[].published_version_idstring (uuid) or null
data[].runs_30dobject
data[].runs_30d.completedintegerFrom 0 to 9007199254740991.
data[].runs_30d.failedintegerFrom 0 to 9007199254740991.
data[].runs_30d.totalintegerFrom 0 to 9007199254740991.
data[].statusenumOne of: draft, live, paused, archived.
data[].triggerenumOne of: message.received, contact.created, schedule, webhook.
data[].trigger_configobject
data[].updated_atstring (date-time)ISO 8601 timestamp.
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create a draft workflow​

POST /v1/workflows

The workflow starts as a draft; publish it to turn it on. Test-mode API keys are refused, because workflows send live messages.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
graphobjectNoDefault {"edges":[],"nodes":[]}.
graph.edgesobject[]YesUp to 400 items.
graph.edges[].fromstringYesUp to 64 characters.
graph.edges[].labelstringNoUp to 40 characters.
graph.edges[].tostringYesUp to 64 characters.
graph.nodesobject[]YesUp to 200 items.
graph.nodes[].configobjectNoDefault {}.
graph.nodes[].idstringYesUp to 64 characters.
graph.nodes[].positionobjectNo
graph.nodes[].typeenumYesOne of: trigger, condition, wait, send, assign, label, webhook, ai.
namestringYesUp to 120 characters.
triggerenumYesOne of: message.received, contact.created, schedule, webhook.
trigger_configobjectNoDefault {}.

Response 201

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
graphobject
graph.edgesobject[]Up to 400 items.
graph.edges[].fromstringUp to 64 characters.
graph.edges[].labelstringUp to 40 characters.
graph.edges[].tostringUp to 64 characters.
graph.nodesobject[]Up to 200 items.
graph.nodes[].configobjectDefault {}.
graph.nodes[].idstringUp to 64 characters.
graph.nodes[].positionobject
graph.nodes[].typeenumOne of: trigger, condition, wait, send, assign, label, webhook, ai.
has_draftboolean
idstring (uuid)
namestring
published_versioninteger or nullFrom 1 to 9007199254740991.
published_version_idstring (uuid) or null
runs_30dobject
runs_30d.completedintegerFrom 0 to 9007199254740991.
runs_30d.failedintegerFrom 0 to 9007199254740991.
runs_30d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, live, paused, archived.
triggerenumOne of: message.received, contact.created, schedule, webhook.
trigger_configobject
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Get a workflow with its draft graph​

GET /v1/workflows/:id

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
graphobject
graph.edgesobject[]Up to 400 items.
graph.edges[].fromstringUp to 64 characters.
graph.edges[].labelstringUp to 40 characters.
graph.edges[].tostringUp to 64 characters.
graph.nodesobject[]Up to 200 items.
graph.nodes[].configobjectDefault {}.
graph.nodes[].idstringUp to 64 characters.
graph.nodes[].positionobject
graph.nodes[].typeenumOne of: trigger, condition, wait, send, assign, label, webhook, ai.
has_draftboolean
idstring (uuid)
namestring
published_versioninteger or nullFrom 1 to 9007199254740991.
published_version_idstring (uuid) or null
runs_30dobject
runs_30d.completedintegerFrom 0 to 9007199254740991.
runs_30d.failedintegerFrom 0 to 9007199254740991.
runs_30d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, live, paused, archived.
triggerenumOne of: message.received, contact.created, schedule, webhook.
trigger_configobject
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Edit the draft, or pause, resume or archive a workflow​

PATCH /v1/workflows/:id

Name, trigger and graph changes go to a draft version; the live version keeps running until the draft is published. status: paused stops new runs and holds running and waiting ones where they are; status: live resumes a paused workflow that has a published version, and its held runs continue. status: archived is final: it stops new runs and cancels running and waiting ones. Test-mode API keys are refused.

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
graphobjectNo
graph.edgesobject[]YesUp to 400 items.
graph.edges[].fromstringYesUp to 64 characters.
graph.edges[].labelstringNoUp to 40 characters.
graph.edges[].tostringYesUp to 64 characters.
graph.nodesobject[]YesUp to 200 items.
graph.nodes[].configobjectNoDefault {}.
graph.nodes[].idstringYesUp to 64 characters.
graph.nodes[].positionobjectNo
graph.nodes[].typeenumYesOne of: trigger, condition, wait, send, assign, label, webhook, ai.
namestringNoUp to 120 characters.
statusenumNoOne of: paused, archived, live.
triggerenumNoOne of: message.received, contact.created, schedule, webhook.
trigger_configobjectNo

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
graphobject
graph.edgesobject[]Up to 400 items.
graph.edges[].fromstringUp to 64 characters.
graph.edges[].labelstringUp to 40 characters.
graph.edges[].tostringUp to 64 characters.
graph.nodesobject[]Up to 200 items.
graph.nodes[].configobjectDefault {}.
graph.nodes[].idstringUp to 64 characters.
graph.nodes[].positionobject
graph.nodes[].typeenumOne of: trigger, condition, wait, send, assign, label, webhook, ai.
has_draftboolean
idstring (uuid)
namestring
published_versioninteger or nullFrom 1 to 9007199254740991.
published_version_idstring (uuid) or null
runs_30dobject
runs_30d.completedintegerFrom 0 to 9007199254740991.
runs_30d.failedintegerFrom 0 to 9007199254740991.
runs_30d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, live, paused, archived.
triggerenumOne of: message.received, contact.created, schedule, webhook.
trigger_configobject
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Publish the draft and turn the workflow on​

POST /v1/workflows/:id/publish

Checks the draft (one trigger, every step reachable, no loops, valid settings, existing segments, labels, people, teams and agents) and makes it the live version. Runs already going stay on the version they started on. Test-mode API keys are refused.

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
graphobject
graph.edgesobject[]Up to 400 items.
graph.edges[].fromstringUp to 64 characters.
graph.edges[].labelstringUp to 40 characters.
graph.edges[].tostringUp to 64 characters.
graph.nodesobject[]Up to 200 items.
graph.nodes[].configobjectDefault {}.
graph.nodes[].idstringUp to 64 characters.
graph.nodes[].positionobject
graph.nodes[].typeenumOne of: trigger, condition, wait, send, assign, label, webhook, ai.
has_draftboolean
idstring (uuid)
namestring
published_versioninteger or nullFrom 1 to 9007199254740991.
published_version_idstring (uuid) or null
runs_30dobject
runs_30d.completedintegerFrom 0 to 9007199254740991.
runs_30d.failedintegerFrom 0 to 9007199254740991.
runs_30d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, live, paused, archived.
triggerenumOne of: message.received, contact.created, schedule, webhook.
trigger_configobject
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List a workflow's versions, newest first​

GET /v1/workflows/:id/versions

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].graphobject
data[].graph.edgesobject[]Up to 400 items.
data[].graph.nodesobject[]Up to 200 items.
data[].idstring (uuid)
data[].published_atstring (date-time) or nullISO 8601 timestamp.
data[].versionintegerFrom 1 to 9007199254740991.
data[].workflow_idstring (uuid)

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.