Skip to Content
SendlySendly
API ReferenceWorkflows

Cancel a workflow execution

POST
/api/v1/workflows/executions/{execution_id}/cancel

Stops one run and stamps it CANCELLED. The execution stays queryable — cancelling is a state change, not a delete. Addressed by execution id alone, so a caller holding one from a list does not need to carry the workflow id with it.

Requires the workflows:write scope — Create, edit, enable, and delete your automation workflows.

headerAuthorizationBearer <API Key>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

execution_id*string

Workflow execution id.

Formatuuid

Response Body

Cancelled execution

application/json
  1. response

One contact's run through a workflow.

id*string
Formatuuid
workflow_id*string
Formatuuid
contact_id*string
Formatuuid
status*string
Value in"RUNNING""WAITING""COMPLETED""EXITED""FAILED""CANCELLED"
current_step_id*|
Formatuuid
exit_reason*string|null
started_at*string
Formatdate-time
completed_at*|
Formatdate-time
Example Request
curl -X POST 'https://api.sendly.now/api/v1/workflows/executions/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workflow_id": "03e70e31-d7a4-4401-a629-6a4b6096cdfe",  "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598",  "status": "RUNNING",  "current_step_id": "7ea464a2-c5aa-44f1-a236-bca8c839d1c0",  "exit_reason": "string",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z"}