Send message (async)
Enqueue a chat turn and return 202 Accepted. The turn runs in a background
Celery task; poll the poll endpoint for progress and the final result.
This replaces the former SSE send_message_stream endpoint.
Use this endpoint for both initial and follow-up messages — conversation context is automatically preserved.
Access Control:
- For shared conversations, only the creator or admins can send messages
- Other project members can view shared conversations but cannot send messages
Impersonation:
- When using impersonation, the message is sent as the impersonated user
Authorizations
Use Authorization: Bearer
Headers
Email of the user to impersonate. Requires CAN_IMPERSONATE_OTHER_USERS permission.
If the target user is not found or does not have access to the project, the request
proceeds as the authenticated user. Contact Clarifeye to enable this permission.
Path Parameters
UUID of the project
UUID of the conversation
Body
Either message or a non-empty newly_attached_document_ids must be
provided. An attachments-only send (empty message + ids) is accepted:
the server synthesizes a short "(I've attached …)" message from the ids.
The user message to send (may be empty when files are attached)
"What information do you have about product pricing?"
Ids of LocalDocuments attached on the composer for this turn. The files already reach the agent via context files; these are also used to render clickable file chips on the user's message in the conversation history.
Response
Turn accepted and enqueued; poll for progress
In-flight turn state returned by the async send_message (202) and poll
endpoints for playground and Work-with-Clara conversations.
Lifecycle of the current chat turn
idle, running, failed Failure detail when turn_status is failed (empty otherwise)
Accumulated message-level events for the current turn. Each item mirrors
a former SSE frame: {type_streaming, payload} where type_streaming is
one of streaming_in_progress, streaming_error, streaming_completed, or
quick_replies_ready (Clara only).
Last activity timestamp; doubles as the turn staleness heartbeat