AI
Agents

Stop one agent turn (session owner only)

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).

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

Path parameters

session_idstring required
turn_idstring required

Response

Request fulfilled, document follows

session_idstring required
turn_idstring required
statusstring required

Changes

No recorded changes to this operation across all 5 revisions of this API.