---
title: "Cancel a campaign or trigger execution"
method: POST
path: "/executions/{id}/cancel"
tags: ["Executions"]
---

# Cancel a campaign or trigger execution

`POST /executions/{id}/cancel`

## Request

- Base URL: `https://api.pocketflows.com`
- URL: `https://api.pocketflows.com/executions/{id}/cancel`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/pocketflows/apis/pocketflows-api/docs/executions/:id/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Response `200`

The cancelled campaign or trigger execution, finished with reason `User cancelled the execution`

- Execution
  - `id` string, required: The ID of the execution
  - `trigger` string: The ID of the trigger (expandable to the full trigger object). Only present on trigger executions
  - `event` string, nullable: The ID of the tracked event that created the execution (expandable to the full event object). Only present on trigger executions; `null` for executions created by internal events
  - `customer` string, required: The customer executing through the campaign
  - `scheduled_at` string, nullable, required: The scheduled time for the next step to execute
  - `step_count` integer, required: The index of the next step to execute
  - `current_step_id` string, nullable, required: The ID of the current step
  - `status` 'pending' | 'in_progress' | 'retrying' | 'finished' | 'failed' | 'stopped', required: The status of the execution
  - `failed_at` string, nullable, required: The time when the execution failed in ISO 8601 format
  - `failed_reason` string, nullable, required: The reason the execution failed
  - `finished_at` string, nullable, required: The time when the execution finished in ISO 8601 format
  - `finished_reason` string, nullable, required: The reason the execution finished
  - `stopped_at` string, nullable, required: The time when the execution was stopped in ISO 8601 format
  - `started_at` string, nullable, required: The time when the execution started processing in ISO 8601 format
  - `created_at` string, required: The time the execution was created — i.e. when the customer was enrolled in the campaign — in ISO 8601 format

## Changes

- **2026-10-09** `0fcba2dc7246`: 2 info
  - added the optional property `event` to the response with the `200` status
  - added the optional property `trigger` to the response with the `200` status
- **2026-10-04** `0f7e82d9d31e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pocketflows/apis/pocketflows-api/changes/executions/:id/cancel/post.md)

---

[API](https://skmtc.dev/pocketflows/apis/pocketflows-api.md) - [All operations](https://skmtc.dev/pocketflows/apis/pocketflows-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pocketflows/apis/pocketflows-api/revisions/3b2a2fc1c31a?raw)
