---
title: "Cancel a task execution"
method: POST
path: "/task/{taskId}/execution/{taskExecutionId}/cancel"
tags: ["Task"]
---

# Cancel a task execution

`POST /task/{taskId}/execution/{taskExecutionId}/cancel`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/task/{taskId}/execution/{taskExecutionId}/cancel`
- Auth: HTTP bearer

## Path parameters

- `taskId` string, required: The ID of the task
- `taskExecutionId` string, required: The ID of the task execution to cancel

## Request body

- object

## Response `200`

The task execution was canceled successfully

- object
  - `id` string, required: The ID of the canceled task execution
  - `taskId` string, required: The ID of the parent task

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
