Skip to main content
POST
/
workflows
/
{id}
/
cancel
Cancel a workflow
curl --request POST \
  --url https://api.dialnexa.com/v1/workflows/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "id": "wf_abc123",
  "status": "cancelled"
}
Cancels a workflow permanently. Any lead that is currently in an active step, for example a live voice call or a webhook delivery, is allowed to finish that step, but no further steps are triggered for any lead in the workflow. The status transitions to cancelled and cannot be returned to active or paused. To run a similar workflow again, create a new one with Create Workflow (or use Duplicate Workflow to clone the cancelled one as a starting point).

When to use this

Cancellation is the right verb when you have decided the workflow’s work is done, not just temporarily on hold. Common cases:
  • End of campaign: the outreach window has closed and you want to formally finish the workflow even if some leads have not yet been dialled.
  • Compliance escalation: a complaint or audit requires you to stop all enrolled leads immediately and permanently.
  • Replacement rollout: a new workflow definition is taking over, and you want the old one to stop firing while keeping its records for audit.
If you only need a temporary stop, use Pause Workflow instead, paused workflows can be resumed and pick up where they left off.

Behavior

  • In-flight calls are not interrupted; only future steps are cancelled.
  • Call logs and per-lead history remain queryable in List Call Logs.
  • The workflow record is retained, use Delete Workflow if you want to remove it entirely.

Path parameters

ParameterDescription
idThe workflow ID, for example wfl_m3v7zb9rk2px.

Errors

  • 404 Not Found is returned when the workflow does not exist.
  • 409 Conflict is returned when the workflow is already in a terminal state.

Request

curl -X POST "https://api.dialnexa.com/v1/workflows/wfl_m3v7zb9rk2px/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "id": "wfl_m3v7zb9rk2px",
  "name": "30-Day Lead Nurture",
  "status": "cancelled",
  "node_count": 5,
  "edge_count": 6,
  "enrolled_leads": 420,
  "created_at": "2024-04-01T08:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string
required

Response

200 - application/json

Success.

id
string
Example:

"wf_abc123"

status
enum<string>
Available options:
draft,
active,
running,
paused,
completed,
cancelled
Example:

"cancelled"