> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vivix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# response.cancel

Cancels an in-progress response. The server responds with `response.done` and a cancelled response status. If there is no response to cancel, the server responds with an error.

**`response.cancel`** targets the current active response. Omit `response_id` for the active response, or supply its matching ID. Successful cancellation also clears pending work. No active response or a mismatched ID produces an error; it cannot remove only a pending response.

## Event fields

<ParamField body="event_id" type="string">
  Client-generated id for this event.
</ParamField>

<ParamField body="type" type="string" required>
  Event type. Must be `response.cancel`.
</ParamField>

<ParamField body="response_id" type="string">
  When provided, this must match the active response ID. Omit it to cancel the active response. Use the ID from `response.created.response.id`.
</ParamField>

<RequestExample>
  ```json response.cancel theme={null}
  {
    "event_id": "evt_response_cancel_001",
    "type": "response.cancel",
    "response_id": "resp_001"
  }
  ```
</RequestExample>
