---
title: "Cancel execution"
method: POST
path: "/agents/v2/executions/{executionId}/cancel"
tags: ["Execution"]
---

# Cancel execution

`POST /agents/v2/executions/{executionId}/cancel`

## Request

- Base URL: `https://odyssey.asteroid.ai`
- URL: `https://odyssey.asteroid.ai/agents/v2/executions/{executionId}/cancel`
- Auth: API key in header `X-Api-Key`

Cancel an execution. The execution stops and cannot be resumed.

## Path parameters

- `executionId` string, uuid, required

## Response `200`

The request has succeeded.

- AgentsExecutionExecutionStatusChange: The status an execution was moved to
  - `executionId` string, uuid, required
  - `status` 'running' | 'paused' | 'cancelled', required: Status values that can be set via the update endpoint

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `500`: Server error

---

[API](https://skmtc.dev/asteroid/apis/agent-service.md) - [All operations](https://skmtc.dev/asteroid/apis/agent-service/llms.txt) - [OpenAPI document](https://skmtc.dev/asteroid/apis/agent-service/revisions/ccc134d1d510?raw)
