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

# Converse Chat Stream — POST /api/v1/converse/chat/stream

> Stream messages to a Botsify agent and get the reply in OpenAI-compatible chat completion format, ideal for existing streaming client libraries.

Use this endpoint to send messages in the familiar chat completion format and receive the agent's full reply as a streaming response. This endpoint is designed for clients that expect an OpenAI-compatible streaming interface — making it straightforward to integrate Botsify into applications already built against OpenAI's Chat Completions API. The response streams the complete chat completion incrementally, so you can begin rendering output before the full reply is ready.

> [!NOTE]
>
> This endpoint returns the **full chat completion in streaming format**, structured for compatibility with OpenAI-compatible clients. If you are integrating with a library or framework that already handles OpenAI streaming responses, this endpoint should work with minimal adaptation. Read the response body incrementally, processing each `data:` event as it arrives.

## Request

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

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

### Body Parameters

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

The unique key that identifies your bot. You can find this in your Botsify dashboard under bot settings.

**fbId** `string` *required*

A unique identifier for the user's session, used to maintain context across conversation turns.

**current\_messages** `string`

A serialized string representing the current conversation context for this turn.

**messages** `object[]`

An array of message objects (each with `role` and `content`) representing the conversation history to include as context.

**append** `string`

Additional text to append to the prompt — useful for injecting dynamic context such as user metadata or retrieved knowledge.

## Example

```bash theme={null}
curl --request POST \
  --url "https://app.botsify.com/api/v1/converse/chat/stream" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --header "Accept: text/event-stream" \
  --no-buffer \
  --data '{
    "bot_key": "bot_abc123",
    "fbId": "user_9876",
    "messages": [
      { "role": "user", "content": "Summarize our last three orders." }
    ]
  }'
```

## Response

The response streams as `text/event-stream`, each event delivering a delta chunk in OpenAI-compatible format. The stream ends with `data: [DONE]`.

```
data: {"id":"chatcmpl-001","object":"chat.completion.chunk","choices":[{"delta":{"role":"assistant"},"index":0}]}

data: {"id":"chatcmpl-001","object":"chat.completion.chunk","choices":[{"delta":{"content":"Here"},"index":0}]}

data: {"id":"chatcmpl-001","object":"chat.completion.chunk","choices":[{"delta":{"content":" are your last three orders:"},"index":0}]}

data: [DONE]
```


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