v2

latestOpenAPI 3.1.12026-07-2613060964.2 KB

Cancel Workflow

API to cancel a running workflow execution. You can cancel a workflow by passing any combination of filters in the request body. When multiple parameters are provided, they are ANDed together to narrow down the matching workflow runs.

For example, passing both workflow_slug and recipients will cancel only the workflow runs that match both the given slug and recipients.

post/v1/workflow_run/cancel/

Request body

execution_idstring

Unique execution identifier of the workflow run to cancel. You can find this in the workflow logs on the SuprSend dashboard.

recipientsstring[]

List of recipient identifiers (distinct_id or contact info) whose workflow runs should be cancelled.

idempotency_keystring

Idempotency key that was passed when triggering the workflow. Use this to cancel a specific workflow triggered with a known idempotency key.

workflow_slugstring

Slug of the workflow whose runs should be cancelled.

Example request

{
  "execution_id": "dsl_xxxx-xxxx-xxxx-xxxx",
  "recipients": [
    "user_123",
    "user@example.com"
  ],
  "idempotency_key": "a1b2c3d4-xxxx-xxxx-xxxx-ef0123456789",
  "workflow_slug": "order-confirmation"
}

Response

200 - OK

execution_idsstring[]

List of workflow execution IDs that were successfully cancelled. Empty array if no matching workflow runs were found.

Example response

{
  "execution_ids": [
    "dsl_xxxx-xxxx-xxxx-xxxx"
  ]
}