API reference
Workflow executions
Follow one contact's run through a workflow, cancel it, or resend its webhook.
A workflow execution follows one contact through a published workflow version. It is created by Run a workflow for one contact or when a workflow campaign dispatches an entry. Do not confuse it with a call execution: one workflow execution can place several calls, each with its own call execution.
All routes need Authorization: Bearer <key>. Errors use the workflow error body {"detail": {"code": "...", "message": "..."}} described in Workflows. An unknown or foreign id answers 404 with code not_found and message Execution not found.
| Operation | Method and path |
|---|---|
| Get a workflow execution | GET /workflow-executions/{execution_id} |
| Cancel a workflow execution | POST /workflow-executions/{execution_id}:cancel |
| Resend the webhook | POST /workflow-executions/{execution_id}/webhook:resend |
Ids and statuses
An execution id has the form exec:<campaign_id>:<reference_id>. You can put it in the path as it is, or URL-encode the colons; both work.
| Status | Meaning |
|---|---|
pending | Created, not started yet. |
running | Moving through the nodes, or waiting on a call, a delay or a retry. |
completed | Reached an end node. outcome is that node's success, failure or neutral. |
failed | Stopped by an error. |
cancelled | Cancelled through the API. |
aborted | Its campaign was aborted. |
The last four are final. When an execution reaches a final status, the platform posts an execution.terminal payload to the workflow's webhook, if one is set.
Operations
Get a workflow execution
GET /workflow-executions/{execution_id}
Returns an execution with its state, the node attempts made so far and its most recent events.
Auth: API key or session token. Role: viewer and up.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
execution_id | path | string | yes | The execution id. |
Request
curl "https://api.sevennadi.si/workflow-executions/exec:7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9:loan-1042" \
-H "Authorization: Bearer vk-0123456789abcdef0123456789abcdef"Response 200 OK
{
"id": "exec:7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9:loan-1042",
"campaign_id": "7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9",
"status": "completed",
"current_node_id": "n_end_reached",
"termination_reason": "reached",
"outcome": "success",
"call_count": 1,
"created_at": "2026-10-13T09:00:00Z",
"updated_at": "2026-10-13T09:02:10Z",
"state": {},
"nodes": [
{"node_id": "n_start", "node_type": "start", "attempt": 1, "status": "completed", "to_node_id": "n_call", "matched_case_index": 0},
{"node_id": "n_call", "node_type": "agent", "attempt": 1, "status": "completed", "to_node_id": "n_end_reached", "matched_case_index": 0,
"outputs": {"call.status": "completed", "call.duration_s": 60}},
{"node_id": "n_end_reached", "node_type": "end", "attempt": 1, "status": "completed"}
],
"events": []
}| Field | Description |
|---|---|
current_node_id | The node the execution is on, or ended on. |
termination_reason | For a completed execution, the label of the end node. Otherwise a reason such as cancelled or campaign_aborted. |
outcome | success, failure or neutral. Absent when the execution did not reach an end node. |
call_count | Calls placed so far. |
state | Values written by set_value effects. |
nodes | One entry per node attempt, in order. Each may also carry scheduled_for, created_at and updated_at. |
events | The latest 100 events of the execution. |
Fields with no value are left out.
Errors
| Status | Code | Message |
|---|---|---|
| 404 | not_found | Execution not found |
Cancel a workflow execution
POST /workflow-executions/{execution_id}:cancel
Cancels an execution that has not finished. It ends with the status cancelled and sends its webhook. Cancelling an execution that is already final succeeds and changes nothing; the response shows its existing status.
Auth: API key or session token. Role: member and up.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
execution_id | path | string | yes | The execution id. |
reason | body | string | no | A note recorded in the execution's events. The body itself is optional. |
Request
curl -X POST "https://api.sevennadi.si/workflow-executions/exec:7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9:loan-1043:cancel" \
-H "Authorization: Bearer vk-0123456789abcdef0123456789abcdef" \
-H "Content-Type: application/json" \
-d '{"reason": "Customer paid at the branch"}'Response 200 OK
{"status": "cancelled"}Errors
| Status | Code | Message |
|---|---|---|
| 404 | not_found | Execution not found |
| 422 | validation_failed | reason must be a string |
Resend the webhook
POST /workflow-executions/{execution_id}/webhook:resend
Queues the execution's original final payload for the workflow's webhook again. Use it after your receiver was down. The payload is the one built when the execution finished, delivered to whatever webhook URL the workflow has now.
Auth: API key or session token. Role: admin and up.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
execution_id | path | string | yes | The execution id. |
Request
curl -X POST "https://api.sevennadi.si/workflow-executions/exec:7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9:loan-1042/webhook:resend" \
-H "Authorization: Bearer vk-0123456789abcdef0123456789abcdef"Response 202 Accepted
{
"execution_id": "exec:7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9:loan-1042",
"webhook_url": "https://hooks.example.test/wf"
}The payload that is delivered looks like this:
{
"event": "execution.terminal",
"schema_version": 1,
"execution_id": "exec:7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9:loan-1042",
"workflow_id": "2ab95da4-50dd-4492-a355-793ec7d810c5",
"workflow_version": 1,
"campaign_id": "7d6c5b4a-3928-4170-8695-a4b3c2d1e0f9",
"reference_id": "loan-1042",
"status": "completed",
"termination_reason": "reached",
"outcome": "success",
"occurred_at": "2026-10-13T09:02:10Z",
"trail": [
{"node_id": "n_start", "node_type": "start", "attempt": 1, "status": "completed", "to_node_id": "n_call", "matched_case_index": 0, "inputs": {}, "outputs": {}}
]
}trail has one entry per node attempt; it is shortened here.
Errors
| Status | Code | Message |
|---|---|---|
| 403 | Standard body: Your role (member) can't change webhooks. It needs admin access; ask an owner or admin of the workspace. | |
| 404 | not_found | Execution not found |
| 409 | not_finished | The execution hasn't finished yet |
| 409 | no_webhook | The workflow has no webhook configured |
| 502 | queue_unavailable | The webhook could not be queued |