Skip to Content
inclamoDocs

Create New Message

POST
/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages

Create a new message in the conversation.

Use application/json for text messages and multipart/form-data when the message includes file attachments.

Multipart attachment request

Send files with the attachments[] form field. curl -F sets the multipart/form-data content type and boundary automatically.

curl -X POST "https://app.chatwoot.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages" \  -H "Authorization: Bearer <your-api-token>" \  -F "content=Here is the screenshot" \  -F "message_type=outgoing" \  -F "private=false" \  -F "attachments[]=@/path/to/screenshot.png"

WhatsApp Template Messages

For WhatsApp channels, you can send structured template messages using the template_params field. Templates must be pre-approved in WhatsApp Business Manager.

By default, content is treated as the already-rendered transcript text for compatibility with existing API and mobile clients. To submit the original template body instead, set template_params.content_mode to raw_template; Chatwoot will substitute processed_params.body before saving the transcript.

Example Templates

Text with Image Header:

{  "content": "Hi your order 121212 is confirmed. Please wait for further updates",  "template_params": {    "name": "order_confirmation",    "category": "MARKETING",    "language": "en",    "processed_params": {      "body": {        "1": "121212"      },      "header": {        "media_url": "https://picsum.photos/200/300",        "media_type": "image"      }    }  }}

Text with Copy Code Button:

{  "content": "Special offer! Get 30% off your next purchase. Use the code below",  "template_params": {    "name": "discount_coupon",    "category": "MARKETING",    "language": "en",    "processed_params": {      "body": {        "discount_percentage": "30"      },      "buttons": [{        "type": "copy_code",        "parameter": "SAVE20"      }]    }  }}

Authorization

headerAuthorizationBearer <token>

Authenticate with Authorization: Bearer <token> using a user API token from Profile Settings. Available in Chatwoot v4.19.0 and later.

Path Parameters

account_id*integer

The numeric ID of the account

conversation_id*integer

The numeric ID of the conversation

Request Body

  1. body
content*string

The content of the message

message_type?string

The type of the message

Value in"outgoing""incoming"
private?boolean

Flag to identify if it is a private note

content_type?string

Content type of the message

Value in"text""input_email""cards""input_select""form""article"
content_attributes?

Attributes based on the content type. For input_select, provide an items array with title, value, and optional description. WhatsApp list messages use description as the row subtitle when present.

campaign_id?integer

The campaign id to which the message belongs

template_params?

WhatsApp template parameters for sending structured messages

Response Body

Success

application/json
  1. response
id?number

The ID of the message

content?string

The text content of the message

account_id?number

The ID of the account

inbox_id?number

The ID of the inbox

conversation_id?number

The ID of the conversation

message_type?integer

The type of the message

Value in0123
created_at?integer

The time at which message was created

updated_at?|

The time at which message was updated

private?boolean

The flags which shows whether the message is private or not

status?|

The status of the message

Value in"sent""delivered""read""failed"null
source_id?|

The source ID of the message

content_type?|

The type of the template message

Value in"text""input_text""input_textarea""input_email""input_select""cards""form""article""incoming_email""input_csat""integrations""sticker""voice_call"null
content_attributes?

The content attributes for each content_type

sender_type?|

The type of the sender

Value in"Contact""User""AgentBot""Captain::Assistant"null
sender_id?|

The ID of the sender

external_source_ids?

The external source IDs of the message

additional_attributes?

The additional attributes of the message

processed_message_content?|

The processed message content

sentiment?|

The sentiment of the message

conversation?|

The conversation object

attachment?|

The file object attached to the image

sender?

User/Agent/AgentBot object

Example Request
curl -X POST 'https://helpdesk.inclamo.com/api/v1/accounts/0/conversations/0/messages' \  -H 'Content-Type: application/json' \  -d '{  "content": "string"}'
Example Response
{  "id": 0,  "content": "string",  "account_id": 0,  "inbox_id": 0,  "conversation_id": 0,  "message_type": 0,  "created_at": 0,  "updated_at": 0,  "private": true,  "status": "sent",  "source_id": "string",  "content_type": "text",  "content_attributes": {},  "sender_type": "Contact",  "sender_id": 0,  "external_source_ids": {},  "additional_attributes": {},  "processed_message_content": "string",  "sentiment": {},  "conversation": {},  "attachment": {},  "sender": {}}