MaillyDocs

Cancel one in-progress workflow run

POST
/workflows/{workflowKey}/runs/{runId}/cancel

Stops a queued, running or waiting run before its remaining steps. Emails already handed to sending are not recalled and other runs are untouched. Cancelling a run that already ended is a no-op that returns cancelled=false.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Path Parameters

workflowKey*string
runId*string

run ID

Request Body

application/json
  1. body
reason?string

Why the run is cancelled, kept in the run log (1-500 characters)

[key: string]?unknown

Response Body

Cancelled, or already ended

application/json
  1. response
success*boolean
cancelled*boolean
run*
platformFailures*array<string>
[key: string]?unknown
curl -X POST 'https://api.mailly.site/workflows/string/runs/string/cancel' \  -H 'Content-Type: application/json' \  -d '{  "property1": null,  "property2": null}'
{  "success": true,  "cancelled": true,  "run": {    "property1": null,    "property2": null  },  "platformFailures": [    "string"  ],  "property1": null,  "property2": null}