Import a historical conversation
Import one historical conversation and its prepared transcript:cxm:conversations.write or a broader scope. Import
stores a new conversation and all supplied messages together, then waits for
the search-indexing attempt before responding. It does not send messages,
start an Assistant, route work or notify agents during import. For new customer
intake, use Create a conversation.
Prepare the dataset
- Transform source records into the fields below. Remove unsupported records, attachments and metadata, and convert voice content into plain-text transcripts.
- Create contacts and, if needed, create organizations. Save their returned IDs.
- Import each conversation with an existing contact ID, or
anonymouswhen you intentionally do not associate a named contact. An optional organization must also already exist in the tenant. - Save each returned conversation ID and any warnings. Keep a source-to-CXP ID mapping to investigate partial runs and uncertain outcomes.
Send a conversation
contact accepts only contactId; organization accepts only
organizationId. Import never updates either record. When you omit
organization, the new conversation inherits the contact’s current
organization, or no organization for anonymous.
Set conversation fields
All timestamps must be valid RFC 3339 strings with an explicit timezone and
cannot be in the future. Message and lifecycle times cannot precede conversation
creation. CXP retains millisecond precision in UTC. It does not invent missing
lifecycle events or require a universal order between resolved and closed times,
which can represent different close/reopen cycles.
For example,
external:123 is stored and returned as external123. Use the
returned ID for subsequent requests and your source-to-CXP mapping. IDs that
differ only by colons identify the same conversation and return the ordinary
ConversationIdConflict error if it already exists. :, :. and CX:1 are
invalid because their normalized values are empty, path-unsafe or reserved.
This normalization applies only to imported conversation IDs; contact and
organization IDs are unchanged.
Agent Assist child conversations require native CX parent IDs. Omit id if
that later capability is needed.
Map messages
Supported channel values are
chat, voice, email, sms, web_chat,
phone_call, web_audio, social, whatsapp, in_app, api and unknown.
The voice media default applies to voice, phone_call and web_audio.
Every array entry is retained, including identical messages. Stored history
orders messages by time, preserving input order when times match. Search can
order equal-time messages differently. Message IDs are generated by CXP;
source message IDs, arbitrary metadata, attachments, recordings and provider
threads are not accepted. Voice messages are transcripts without call playback.
Read the result and warnings
A successful import returns201 Created:
201, with:
IndexingConflict also means creation succeeded, but an existing search
projection prevented this indexing attempt. Record either warning and ask your
CXP administrator or support contact to repair indexing. Search and public
conversation-detail reads can remain missing or stale until repair. Do not
retry the entire import solely to repair indexing.
Authentication, rate limits and retry conventions are in the
API overview. There is no idempotency or replay guarantee.
A duplicate-ID error does not prove an earlier payload matched; a retry without
a preserved ID can create another conversation.

