Skip to Content
SendlySendly
API ReferenceWorkflows

Pause a workflow and cancel its running executions

POST
/api/v1/workflows/{id}/pause

Disables the workflow and cancels every RUNNING/WAITING execution inside it.

PATCH { "enabled": false } stops NEW runs starting and leaves every in-flight contact walking the graph — the next delay still expires, the next email still sends. Pausing does both, and reports how many runs it stopped.

Cancelling is terminal: resume re-opens the workflow to new runs, it does not put the cancelled contacts back where they were.

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.

id*string

Workflow id.

Formatuuid

Response Body

The workflow, and the number of runs this call cancelled

application/json
  1. response

The workflow after a pause or resume, with the number of runs the call stopped.

workflow*

An automation workflow as exposed on the v1 API.

cancelled_executions*integer

Runs stopped by this call. Always 0 for resume; on pause it is the number of RUNNING/WAITING executions that were cancelled, which is what makes pausing different from PATCH { enabled: false } (that only stops NEW runs starting).

Example Request
curl -X POST 'https://api.sendly.now/api/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/pause'
Example Response
{  "workflow": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "description": "string",    "enabled": true,    "trigger_type": "EVENT",    "event_name": "string",    "allow_reentry": true,    "max_executions_per_hour": 0,    "version": 0,    "step_count": 0,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  },  "cancelled_executions": 0}