-
Notifications
You must be signed in to change notification settings - Fork 179
docs: document email subject, To, Cc and Bcc on Create New Conversation #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| --- | ||
| title: "Create New Conversation" | ||
| openapi: "POST /api/v1/accounts/{account_id}/conversations" | ||
| --- | ||
|
|
||
| ## 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. | ||
|
|
||
| | Dashboard field | API field | Notes | | ||
| | --------------- | ------------------------------------ | --------------------------------------------------------------------------- | | ||
| | **Via** (From) | `inbox_id` | Not set directly. The From address is resolved from the inbox's configuration. | | ||
| | **To** | `source_id` + `contact_id` | For an Email inbox, `source_id` is the contact's email address. | | ||
| | **Subject** | `additional_attributes.mail_subject` | Stored on the conversation and reused for the whole thread. | | ||
| | **Cc** | `message.cc_emails` | Comma-separated list. | | ||
| | **Bcc** | `message.bcc_emails` | Comma-separated list. | | ||
| | — | `message.to_emails` | Comma-separated list. Overrides the contact's email as the recipient. | | ||
|
|
||
| ```bash | ||
| curl --request POST \ | ||
| --url https://app.chatwoot.com/api/v1/accounts/{account_id}/conversations \ | ||
| --header 'api_access_token: <your-access-token>' \ | ||
| --header 'Content-Type: application/json' \ | ||
| --data '{ | ||
| "source_id": "john@example.com", | ||
| "inbox_id": 1, | ||
| "contact_id": 1, | ||
| "additional_attributes": { | ||
| "mail_subject": "Issue with my recent order" | ||
| }, | ||
| "message": { | ||
| "content": "Hi John, could you share your order number?", | ||
| "cc_emails": "billing@example.com, support@example.com", | ||
| "bcc_emails": "archive@example.com" | ||
| } | ||
| }' | ||
| ``` | ||
|
|
||
| <Note> | ||
| `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. | ||
| </Note> | ||
|
|
||
| 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. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs.jsonalready auto-populates the Application APIs group from the hosted OpenAPI spec and includes theConversationstag (docs.json:243-266), so this MDX page targets the same operation as the generated Create New Conversation page. Mintlify treats an MDX file plus a navigation-generated entry for the same OpenAPI operation as an unsupported conflict, which means the new email guidance can be ignored or collide with the generated page; please move this content into the OpenAPIx-mintcontent or replace the generated navigation entry with the MDX page.Useful? React with 👍 / 👎.