Send a message
/api/v1/threads/{id}/messagesSends a member message and receives the reply synchronously or as a stream.
Path parameters
Thread identifier (thr_…).
Request body
Message text sent by the member.
When false (default), returns a single JSON payload once generation finishes. When true, streams Server-Sent Events.
Delivery modes
Synchronous (stream: false): Returns 200 OK (application/json) with the thread ID and message object (id, role, text, created_at).
Streaming (stream: true): Returns 200 OK (text/event-stream) emitting SSE frames:
status: Progress steps and UI labels (thinking,reading_your_notes,searching,replying).delta: Incremental text chunks.done: Emitted when the turn finishes and is persisted to the thread.
See the Streaming replies guide for client implementations.
Returns
HTTP Status Codes
Message processed and reply returned.
The integration key is missing, invalid, or revoked.
No thread exists with this ID in your organisation.
Member onboarding is incomplete. Complete onboarding before sending messages.
Validation failed (empty text or text over 4,000 characters).
Coach temporarily unavailable. Safe to retry with backoff.
Synchronous (JSON)
curl -X POST "https://api.bellacoach.ai/api/v1/threads/thr_9c41f0b7a2d64e83b15c7f20/messages" \
-H "Authorization: Bearer $BELLA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "What exercises are safe during week 24 of pregnancy?",
"stream": false
}'Response (200 OK, application/json)
{
"thread": "thr_9c41f0b7a2d64e83b15c7f20",
"message": {
"id": "msg_7d02edd7fc430c94162cba02",
"role": "coach",
"text": "At 24 weeks, maintaining moderate-intensity strength training is great for back support and stamina. Focus on squats, hip hinge variations, and diaphragmatic breathing, while avoiding movements that cause abdominal coning.",
"created_at": "2026-11-08T23:08:00.123456Z"
}
}