---
title: "Add message to a conversation with streaming response"
method: POST
path: "/conversations/{conversationId}/messages/stream"
tags: ["Conversations"]
---

# Add message to a conversation with streaming response

`POST /conversations/{conversationId}/messages/stream`

Add a follow-up message to an existing conversation and stream the
assistant's response over Server-Sent Events.

Functionally equivalent to `POST /conversations/{conversationId}/messages`
but the response is delivered as an SSE stream so clients can render
the answer incrementally.

The wire vocabulary is described by `AssistantMessageStreamSSEEvent`.
It is the same event set as `/conversations/stream`; only the
`connected` and `complete` payloads differ because the conversation
already exists when this route is called.

## Path parameters

- `conversationId` string, objectId, required

## Request body

- AddMessageRequest — Request body for adding a message to an existing conversation
  - `query` string, required — The follow-up question or message content
  - `filters` Filters — App connector instance ids and knowledge-base / record-group ids that narrow retrieval for a turn. For **org assistant** chat streams, send explicit `apps` / `kb` lists. For **agent** chat streams, send explicit id lists, or **omit** `filters` (and `tools`) to let the service use the agent’s stored knowledge and tool configuration. Sending `{ "apps": [], "kb": [] }` on an agent stream means **no** knowledge sources for that turn (it is not “full org default”).
    - `apps` string[] — Connector instance ids to scope retrieval for this turn. Each element must be a UUID (connector instance id, record-group id, etc.) or the org knowledge-base collection sentinel `knowledgeBase_<orgId>` (pattern `knowledgeBase_[a-zA-Z0-9_-]+`). Gateway validation matches Zod `appOrKbIdSchema`.
    - `kb` string[] — Knowledge-base / record-group ids to scope retrieval for this turn. Each element uses the same accepted formats as `apps`: a UUID or `knowledgeBase_<orgId>` (pattern `knowledgeBase_[a-zA-Z0-9_-]+`).
  - `appliedFilters` AppliedFilters — Rich filter state selected by the user, used for display and persistence only. This mirrors the active selection shown in the UI and is distinct from the machine-readable `filters` field used for retrieval scoping.
    - `apps` AppliedFilterNode[] — Applied app/connector filter nodes
      - `id` string — Unique identifier of the filter node
      - `name` string — Display name of the filter node
      - `nodeType` string — Type of the node (e.g. app, recordGroup, folder, record)
      - `connector` string — Connector identifier associated with this node
    - `kb` AppliedFilterNode[] — Applied knowledge-base filter nodes
      - `id` string — Unique identifier of the filter node
      - `name` string — Display name of the filter node
      - `nodeType` string — Type of the node (e.g. app, recordGroup, folder, record)
      - `connector` string — Connector identifier associated with this node
  - `attachments` ChatAttachmentRef[] — Uploaded chat attachments for this follow-up turn (see `POST /conversations/attachments/upload`).
    - `recordId` string, required — Attachment record id returned from the upload endpoint.
    - `recordName` string — Original display name of the file when known.
    - `mimeType` string — MIME type of the uploaded file.
    - `extension` string — File extension (e.g. `pdf`).
    - `virtualRecordId` string — Optional synthetic record id used by the graph layer.
  - `modelKey` string — Override the model for this specific message
  - `modelName` string — Display name of the model
  - `modelFriendlyName` string — Friendly display name of the model
  - `chatMode` 'web_search' | 'internal_search' — Chat mode for this message
  - `timezone` string — IANA timezone identifier from the client (top-level field). Used to provide time-aware context to the AI.
  - `currentTime` string, date-time — ISO 8601 / RFC 3339 datetime from the client (top-level field; UTC `Z` or numeric offset).
  - `tools` string[] — Optional list of tool identifiers the agent may invoke for this follow-up message. Semantics are identical to the create-conversation tools field.

## Response `200`

SSE stream established. The body is a sequence of
`text/event-stream` frames using the event vocabulary described
on the schema below.

## Other responses

- `400` — Invalid request — `query` is missing or empty, or another field fails validation (for example a malformed `currentTime`).
- `401` — Unauthorized — valid bearer token required.
- `403` — Forbidden — the caller's token does not include the `conversation:chat` OAuth scope.
- `404` — The conversation does not exist, is deleted, or does not belong to the caller.
- `500` — Internal error before the SSE stream is established (for example, the user message could not be persisted to the conversation). Once the stream is open, terminal failures are surfaced as an `error` SSE event instead of an HTTP status change.

---

[API](https://skmtc.net/pipeshub-ai/apis/pipeshub-api.md) · [All operations](https://skmtc.net/pipeshub-ai/apis/pipeshub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipeshub-ai/pipeshub-api/versions/abd27cfefc73/schema)
