---
title: "Cancel a run"
method: POST
path: "/api/v2/runs/{runId}/cancel"
tags: ["runs"]
---

# Cancel a run

`POST /api/v2/runs/{runId}/cancel`

## Request

- Base URL: `https://api.trigger.dev`
- URL: `https://api.trigger.dev/api/v2/runs/{runId}/cancel`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/docs/api/v2/runs/:runId/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancels an in-progress run. If the run is already completed, this will have no effect.

## Response `200`

Successful request

- object
  - `id` string: The ID of the run that was canceled.

## Other responses

- `400`: Invalid request
- `401`: Unauthorized request
- `404`: Resource not found

## Changes

- **2024-05-31** `3c0abddc2b32`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/changes/api/v2/runs/:runId/cancel/post.md)

---

[API](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api.md) - [All operations](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/revisions/441161111493?raw)
