Skip to main content
POST
/
conversations
/
{conversation_id}
/
messages
Add Message
curl --request POST \
  --url https://api.example.com/conversations/{conversation_id}/messages

Path Parameters

ParameterTypeDescription
conversation_idstringConversation ID

Request Body

{
  "role": "user",
  "content": "What were the top products?"
}
FieldTypeRequiredDescription
rolestringyesuser or assistant
contentstringyesMessage text

Response

{
  "id": "msg_789",
  "role": "user",
  "content": "What were the top products?",
  "created_at": "2025-01-15T10:31:00Z"
}