---
title: "Chat turn cancelled"
method: POST
path: "chat.turn_cancelled"
tags: ["Chats"]
---

# Chat turn cancelled

`POST chat.turn_cancelled` (webhook)

Triggered when someone stops the agent before it finishes a reply

## Headers

- `webhook-id` string, required
- `webhook-timestamp` string, required
- `webhook-signature` string, required

## Payload

- object
  - `id` string, required: Unique identifier for this webhook event
  - `object` 'event', required
  - `type` 'chat.turn_cancelled', required: The event type
  - `livemode` boolean, required: `false` when a test purchase or a test event from the dashboard caused this event, `true` otherwise
  - `created_at` string, date-time, required: ISO 8601 timestamp of when the event was created
  - `api_version` string, required: API version used to generate the payload
  - `data` object, required: `object` is the resource exactly as its API endpoint returns it.
    - `object` ChatTurn, required
      - `object` string, required
      - `chat_id` string, required: The conversation (`aichat_...`). Read it at GET /v1/chats/{id}.
      - `task_run_id` string, nullable, required: The task run (`trun_...`) this conversation belongs to, when a task or an API call started it.
      - `status` 'completed' | 'needs_approval' | 'failed' | 'cancelled', required: `needs_approval` when the turn stopped to wait for someone to approve an action.
      - `pending_approval_ids` string[], required: The approvals (`apr_...`) the turn waits on. Empty unless `status` is `needs_approval`.
      - `url` string, required: The conversation in the Crevio dashboard.
      - `settled_at` string, required

## Acknowledgement `200`

Return any 2xx status within 5 seconds to acknowledge receipt.

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) - [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/ccbd8fcbd6d7?raw)
