How to Send a Message
Send a text message to a conversation. Carbon Voice will convert it to audio. Use the conversation_id from a webhook event to reply back to the same conversation. Note some endpoints may use channel_id instead of conversation_id, the value from either can be used.
POST /v6/messages/text
Content-Type: application/json
{
"conversation_id": "string",
"transcript": "string",
"reply_to_message_id": "string",
"idempotency_key": "string",
"attachments": []
}
Request body fields:
| Field | Description |
|---|---|
conversation_id | The conversation to send to (use conversation_id from webhook). |
transcript | The text content to send. |
reply_to_message_id | The message ID to reply to (use id from webhook). Backend resolves the thread root automatically. |
idempotency_key | A client-generated GUID used to de-duplicate repeated requests. |
attachments | Optional array of attachment objects (files or links). |
Response: Returns a message object containing id (the message_id).
Sending a Reply
Include reply_to_message_id to thread your reply under an existing message. The webhook payload exposes conversation_id and id — use these as conversation_id and reply_to_message_id in your request.
{
"conversation_id": "<conversation_id from webhook>",
"transcript": "Your reply here",
"reply_to_message_id": "<id from webhook>",
"idempotency_key": "<generated-guid>"
}