post
https://api.customerly.io/v2/conversations//messages
Adds a new message to an existing conversation. The message can be sent by either
the contact or an account (team member).
Use Cases
1. Contact replies (customer responds)
When sender_type is "contact", the contact who owns the conversation is replying.
- Only the
sender_typefield is required (noaccount_idneeded) - The contact is automatically identified from the conversation
- AI chatflow may be triggered if configured
2. Account replies (team member responds)
When sender_type is "account", a team member is replying to the contact.
- Both
sender_typeandaccount_idare required - The account must have permission to view this conversation
- The conversation must NOT be assigned to AI (Aura)
- If assigned to AI, you'll get a
conversation_assigned_to_aierror
- If assigned to AI, you'll get a
Request Fields
Required fields
sender_type(string): Who is sending - either"contact"or"account"- At least one of:
contentorattachmentsmust be provided
Conditional fields
account_id(integer): Required only whensender_typeis"account"
Optional fields
content(string): Message text. HTML is supported (safe tags: p, br, b, i, u, a, img)attachments(array): File attachments (max 5 files, 5MB each)is_note(boolean): Mark message as internal note (default: false). Only available whensender_typeis"account".
Notes are visible only to team members, not to contacts.
Examples
Example 1: Contact replies
{
"sender_type": "contact",
"content": "<p>Thanks for the help!</p>"
}Example 2: Account replies
{
"sender_type": "account",
"account_id": 456,
"content": "<p>I'm glad I could help!</p>"
}Example 3: Reply with attachment
{
"sender_type": "contact",
"content": "<p>Here's the document you requested</p>",
"attachments": [
{
"filename": "invoice.pdf",
"base64": "data:application/pdf;base64,JVBERi0..."
}
]
}Example 4: Account sends internal note
{
"sender_type": "account",
"account_id": 456,
"content": "<p>Customer seems frustrated, handle with care</p>",
"is_note": true
}Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
401Authentication required
403Permission denied or contact is spam
404Conversation or account not found
409Conflict - conversation frozen, channel not supported, customer window expired, or conversation assigned to AI
422Validation failed
500Internal server error