Start a streaming message
POST/chat.startStream
Open a streaming message and post its first content. Streaming lets a bot deliver a message incrementally — recipients see the text fill in live (with a "typing…" indicator) instead of waiting for the full response. This is useful for AI agents that produce text token-by-token.
A stream has three steps, each its own request:
/chat.startStream— open the stream and pick the destination. Returns astreamId./chat.appendStream— append chunks of text (call as many times as needed)./chat.stopStream— finalize the stream into a single persisted message.
Pass the streamId returned here to every subsequent appendStream and
stopStream. The sender, destination, and thread are fixed for the lifetime
of the stream.
Custom sender (optional): same semantics as
/chat.post — sender.name / sender.imageUrl
apply a per-message display override to the finalized message, and
sender.id authors the stream as a configured bot persona (unknown ids
are accepted and ignored). The typing indicator shown while streaming uses
the override name when given, otherwise the persona's or app's configured
name. See the Sender Profiles guide.
Access: Organization and Personal. Organization tokens follow the
same public-group carveout as /chat.post: the
bot may stream into a public group in its roam without joining.
Personal tokens can stream only where the owner is a member
(403 not_in_chat for an unjoined public group) and reject the
sender field.
Required scope: chat:send_message or chat:write
Destination
Provide exactly one of chatId, groupId, or userIds. If text is empty,
the destination is recorded but message creation is deferred until the first
non-empty appendStream or the stopStream call.
Thinking streams
Set kind to thinking to finalize the message as a thought-bubble; clients
show a "thinking…" indicator instead of "typing…". The default kind is text.
Limits
- Up to 10 concurrent streams per API client.
- Only one active stream per chat at a time.
- Accumulated text may not exceed the regular message size limit.
OpenAPI Spec: chat-v1.json
Request
Responses
- 200
- 400
- 401
- 403
- 405
- 413
- 429
- 500
Stream started.
Bad request. Common causes:
- No destination, or multiple destinations (exactly one of chatId/groupId/userIds is required)
- Unknown
kind(must betextorthinking) - Invalid thread timestamp, or threading a destination that does not support it
- Another stream is already active in the target chat
Presented invalid authentication credentials.
The token lacks the required scope (chat:send_message or chat:write).
An unsupported method was requested.
Initial text exceeds the maximum allowed message size.
Too many concurrent streams (max 10 active per API client).
An internal error occurred.