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

# Stop Converse Stream — POST /api/v1/converse/stop-stream

> Cancel an in-progress Botsify agent streaming response by supplying the stream ID. Immediately halts token generation so no further output is produced.

Use this endpoint to cancel a streaming response that is currently in progress. When a user navigates away, submits a new message, or explicitly stops generation, you can call this endpoint with the stream's ID to halt output immediately. This prevents the server from continuing to generate tokens for a response that is no longer needed.

## Request

**`POST https://app.botsify.com/api/v1/converse/stop-stream`**

**Authorization:** Bearer token — include your token in the `Authorization: Bearer <token>` header.

### Body Parameters

**stream\_id** `string` *required*

The unique identifier of the stream to interrupt. This ID is returned in the initial response when you start a streaming conversation via the [Converse Stream](/api-reference/messaging/converse-stream.md) or [Chat Stream](/api-reference/messaging/converse-chat-stream.md) endpoints.

**bot\_key** `string` *required*

The unique key that identifies your bot. Must match the `bot_key` used when the stream was started.

## Example

```bash theme={null}
curl --request POST \
  --url "https://app.botsify.com/api/v1/converse/stop-stream" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "stream_id": "stream_a1b2c3d4",
    "bot_key": "bot_abc123"
  }'
```

## Response

A successful request returns `200 OK` confirming that the stream has been stopped.

```json theme={null}
{
  "success": true,
  "stream_id": "stream_a1b2c3d4",
  "message": "Stream stopped successfully."
}
```

If the stream has already completed or the `stream_id` is not found, the API returns a `404 Not Found` response:

```json theme={null}
{
  "success": false,
  "error": "Stream not found or already completed."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.