Skip to main content

Endpoint

Authentication

This endpoint requires an OAuth access token. Send it as a bearer token:
Required scope: tasks:write
The cancellation is performed as the access token’s user and recorded against them.

Path Parameters

Request Example

Response

Success Response

Status Code: 200 OK

Response Fields

Error Responses

400 Bad Request

Returned when the access token has no user behind it. client_credentials tokens act as the admin who created the application, so this applies only to tokens issued before application creators were recorded.

401 Unauthorized

Returned when the access token is missing, unknown, revoked, or expired, or when an X-API-Key was sent instead of a bearer token. See OAuth error responses.

403 Forbidden

Returned when the token lacks the required scope:
Or when the user may not act on this task:

404 Not Found

Returned when the task does not exist.

409 Conflict

Returned when the task cannot be cancelled - for example it has already completed or been cancelled.

429 Too Many Requests

Returned when your organization exceeds its per-minute request limit.

500 Internal Server Error

Returned when cancellation fails due to a server error.

Notes

Cancelling a task is irreversible. The workflow will stop at its current step and cannot be resumed.
Only tasks with status pending or in_progress can be cancelled. Completed, failed, or already cancelled tasks cannot be cancelled.

Use Cases

This endpoint is useful for:
  • User-initiated cancellation - Let a user stop a workflow they no longer need, as themselves
  • Error handling - Cancel workflows that are stuck or encountering issues
  • Workflow management - Clean up unnecessary or duplicate workflow instances