---
title: "Cancel journey runs"
method: POST
path: "/journeys/cancel"
tags: ["Journeys"]
---

# Cancel journey runs

`POST /journeys/cancel`

Cancels in-flight journey runs, either every run sharing a cancelation token or one run by id. Use it to stop a sequence when the event resolves.

## Headers

- `Idempotency-Key` string
- `x-idempotency-expiration` string

## Request body

- union — Request body for `POST /journeys/cancel`. Provide EXACTLY ONE of `cancelation_token` (cancels every run associated with the token) or `run_id` (cancels a single tenant-scoped run).
  - object
    - `cancelation_token` string, required
  - object
    - `run_id` string, required

## Response `202`

Cancelation accepted

- union — `202 Accepted` body for `POST /journeys/cancel`, returning the submitted identifier. When called with `cancelation_token`, returns `{ cancelation_token }`; when called with `run_id`, returns `{ run_id, status }`.
  - object
    - `cancelation_token` string, required
  - object
    - `run_id` string, required
    - `status` string, required — The run's resulting status. `CANCELED` when the run was active and has been canceled; `PROCESSED` or `ERROR` when the run had already finished and was left unchanged; `CANCELED` for an already-canceled run.

## Other responses

- `400` — Bad request — both or neither of cancelation_token / run_id supplied
- `404` — A run_id was supplied but no matching run exists for this tenant
- `422` — Unprocessable entity

---

[API](https://skmtc.net/trycourier/apis/courier.md) · [All operations](https://skmtc.net/trycourier/apis/courier/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycourier/courier/versions/04f69fbf96a5/schema)
