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

# Cancel a trigger execution

`POST /trigger_executions/{id}/cancel`

## Request

- Base URL: `https://api.pocketflows.com`
- URL: `https://api.pocketflows.com/trigger_executions/{id}/cancel`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/pocketflows/apis/pocketflows-api/docs/trigger_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 `TriggerExecution` object, finished with reason `User cancelled the execution`

- TriggerExecution
  - `id` string, required: The ID of the trigger execution
  - `trigger` string, required: The ID of the trigger (expandable to the full trigger object)
  - `event` string, nullable, required: The ID of the tracked event that created the execution (expandable to the full event object). `null` for executions created by internal events
  - `customer` string, required: The ID of the customer executing through the trigger (expandable to the full customer object)
  - `scheduled_at` string, nullable, required: The scheduled time for the next step of the trigger execution
  - `step_count` integer, required: The index of the next step of the trigger 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
  - `failed_reason` string, nullable, required: The reason for failure
  - `finished_at` string, nullable, required: The time when the execution finished
  - `finished_reason` string, nullable, required: The reason for finishing
  - `stopped_at` string, nullable, required: The time when the execution was stopped
  - `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 trigger — in ISO 8601 format

## Changes

- **2026-10-09** `0fcba2dc7246`: 1 breaking, 3 info
  - the `customer` response's property type changed from no type to `string` for status `200`
  - removed `#/components/schemas/Customer, subschema #1` from the `customer` response property `anyOf` list for the response status `200`
  - added the required property `event` to the response with the `200` status
  - added the required property `trigger` to the response with the `200` status
- **2026-10-07** `a8a7fb59cefc`: 2 info
  - added the required property `customer/anyOf[subschema #2: The Customer object]/first_name` to the response with the `200` status
  - added the required property `customer/anyOf[subschema #2: The Customer object]/last_name` 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/trigger_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)
