---
title: "Stop one agent turn (session owner only)"
method: POST
path: "/agents/sessions/{session_id}/turns/{turn_id}/cancel"
tags: ["AI", "Agents"]
---

# Stop one agent turn (session owner only)

`POST /agents/sessions/{session_id}/turns/{turn_id}/cancel`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/agents/sessions/{session_id}/turns/{turn_id}/cancel`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Records the stop request where every worker can see it. The turn starts no further model or tool call, the call running is cut, and the turn ends with a `stopped` event listing the writes already made. Idempotent: a repeat, or a call after the turn ended, answers 200 with the turn's state (`stopping`, `stopped` or `ended`).

## Path parameters

- `session_id` string, required
- `turn_id` string, required

## Response `200`

Request fulfilled, document follows

- AgentTurnCancelResponse
  - `session_id` string, required
  - `turn_id` string, required
  - `status` string, required

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
