Skip to main content
POST
Create New Conversation

Email inboxes

When the target inbox is an Email inbox, a few extra fields control the subject line and the recipients of the outgoing email. They map to the fields an agent fills in when composing a new email conversation from the dashboard.
cc_emails, bcc_emails and to_emails belong to the message object, not to additional_attributes. They are only processed for Email inboxes and are ignored on every other channel.
A few things to keep in mind:
  • All three email lists take a comma-separated string, not an array. Whitespace around the addresses is stripped. If any address is not a valid email, the request fails with Invalid email address.
  • mail_subject applies to the whole conversation, not just the first message. The first email goes out with the subject as-is; from the second message onwards, replies are sent as Re: <subject>. Private notes and activity messages are not counted.
  • If you omit mail_subject, Chatwoot falls back to [#<conversation_display_id>] New messages on this conversation.
  • The From address cannot be set per request. It is resolved from the inbox and channel configuration — for inboxes using SMTP or OAuth it is the channel’s email address, otherwise it is the inbox’s configured email address, falling back to the account’s support email.

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

Body

application/json
source_id
string
required

Conversation source id

Example:

"1234567890"

inbox_id
integer

Id of inbox in which the conversation is created
Allowed Inbox Types: Website, Phone, Api, Email

Example:

1

contact_id
integer

Contact Id for which conversation is created

Example:

1

additional_attributes
object

Lets you specify attributes like browser information

Example:
custom_attributes
object

The object to save custom attributes for conversation, accepts custom attributes key and value

Example:
status
enum<string>

Specify the conversation whether it's pending, open, closed

Available options:
open,
resolved,
pending
Example:

"open"

assignee_id
integer

Agent Id for assigning a conversation to an agent

Example:

1

team_id
integer

Team Id for assigning a conversation to a team\

Example:

1

snoozed_until
string<date-time>

Snoozed until date time

Example:

"2030-07-21T17:32:28Z"

message
object

The initial message to be sent to the conversation

Response

Success

id
number

ID of the conversation

account_id
number

Account Id

inbox_id
number

ID of the inbox