Skip to main content
POST
Create conversation
Replace {your-subdomain} with your workspace’s subdomain.
Learn how to find your subdomain in Workspace subdomain.

Importing past conversations

To bring in conversations from another tool, pass created_at on the conversation and on every message in messages_attributes. The conversation is then imported rather than started:
  • It keeps the dates you send instead of the time of the request.
  • Its messages are stored as already read.
  • Nothing that is meant for a live conversation happens. No email, push, Slack or Microsoft Teams notification is sent, no automation rule or webhook runs, the chatbot and AI assistant stay out of it, and no reporting data is recorded.
To import the agent replies in the same request, pass the team member’s email as sender_email on those messages. A message without sender_email, or with the contact’s email, is from the contact. The email must belong to a team member of your workspace, including one who has since been deactivated, so replies from agents who have left keep their sender. Any other email rejects the whole request, so a typo can’t turn an agent reply into a message from the contact. Importing a reply doesn’t assign the conversation to the agent who sent it. Pass assignee_email for that. You can also add messages afterwards with Send message, passing created_at on each of them. Pass external_id, your own id for the conversation and for each message, to make an import safe to run again. When a conversation or message with the same external_id already exists in the workspace, it is returned with status 200 and nothing new is created. Time-based automation rules only look at conversations updated in the last month. An imported conversation that is still open and was updated within that month can match a rule such as “time since last reply”, as a live conversation would. Import such conversations as closed if you don’t want that.

Headers

X-Api-Key
string
default:your-api-key
required

Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.

Accept
enum<string>
default:application/json
required

Specifies the expected response format. Must be set to application/json for proper API communication.

Available options:
application/json

Body

application/json
visitor_attributes
object
required

Details of the contact starting the conversation.

messages_attributes
object[]
required

Messages that start the conversation. They are from the contact unless an imported message names an agent in sender_email. At least one message with a body is required.

created_at
string<date-time>

ISO 8601 time the conversation originally started. Passing it imports the conversation. It can't be in the future.

Example:

"2025-03-01T10:00:00Z"

closed_at
string<date-time>

ISO 8601 time the conversation was originally closed. Allowed only with created_at and a status of closed, and it can't be earlier than created_at. A closed conversation imported without it is closed at the time of its last message.

Example:

"2025-03-01T11:30:00Z"

external_id
string

Your own id for the conversation, unique in your workspace. When a conversation with this external_id already exists, it is returned with status 200 and nothing is created. Conversation and message ids are checked separately, so a message may reuse a conversation's id.

Example:

"intercom-215472"

title
string
Example:

"Refund for order #1042"

status
string

Status of the conversation. It must be one of the statuses of your workspace.

Example:

"open"

priority
enum<string>
Available options:
low,
medium,
high,
urgent
Example:

"high"

assignee_email
string<email>

Email of the team member to assign the conversation to. It is ignored when no team member has this email.

Example:

"oliver@example.com"

group_name
string

Name of the group to assign the conversation to. It is ignored when no group has this name.

Example:

"Billing"

tags
string[]

Names of the tags to add to the conversation. Tags that don't exist yet are created.

Example:
ticket_fields
object

Ticket field values keyed by the field's name. Use the option label for dropdown fields, an array of labels for multi-select fields and true or false for checkbox fields.

Example:
origin_page_url
string

URL of the page the conversation was started from.

Example:

"https://example.com/pricing"

origin_page_title
string

Title of the page the conversation was started from.

Example:

"Pricing"

Response

OK - A conversation with this external_id already exists, and it is returned unchanged

conversation
object