Overview
POST
/chat/conversations/{id}/messageschatSend a message and stream the assistant turn (SSE)
Sends a user message and streams the assistant response as Server-Sent Events (`text/event-stream`). The stream emits an `open` event, then `token`, `tool_call_started`, `tool_call_completed`, and a terminal `done` event; failures surface as an `error` event. The response is always 200 even when the conversation is missing or the turn fails — those conditions are reported in-band via the `error` event rather than an HTTP status.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- idpathstring
Request body
application/json · optional
- messagestring
- clientMessageIdoptionalstring
Idempotency key for the user message
Example
{
"message": "string",
"clientMessageId": "string"
}Responses
200
SSE stream of chat-turn events
- textstring
Example
{
"text": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/chat/conversations/{id}/messages" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "string",
"clientMessageId": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/chat/conversations/{id}/messages", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"message\": \"string\",\n \"clientMessageId\": \"string\"\n}",
});
const data = await res.json();