Use this endpoint to record a message exchanged with a contact (for example an SMS,
email, or chat message from an integration such as Intercom). Each message is linked
to a contact point — either a phone number or an email address — and is rendered as
its own item on the contact’s timeline.
Provide exactly one contact point: phone (optionally with phoneCountryCodes) or
email. Messages are grouped into a conversation thread by
conversationExternalId, and ingestion is idempotent per conversation on
messageExternalId: a repeated call with the same messageExternalId returns the
existing message with created: false instead of creating a duplicate.
When integrationId is supplied it must reference an existing integration in the
workspace; the message is then attributed to that integration (name and logo) on the
timeline.
Supply customerId to attach a message only to one customer sharing the email or
phone. The key must have read/write access to that customer, and the contact point
must belong to it. A replay cannot switch its customer. customerId cannot be
combined with integrationId, whose provider reconciliation links customers by
contact.
Ingests a single inbound or outbound message into a contact conversation. Messages are deduplicated per conversation by message_external_id.
RequestAddCorrespondenceMessageRequest
ResponseAddCorrespondenceMessageResponse
AddCorrespondenceMessageRequest
Field
Type
Description
integration_id
optional string
Optional source integration that produced this message. When set, the message is attributed to the integration (name/logo) in the timeline.
channel
string
Delivery channel, for example "sms", "email", or "chat".
direction
string
Message direction. Defaults to "inbound" when omitted.
phone
optional string
Contact point. Exactly one of phone or email is required. Accepts either a full international number such as "+31612345678" or a local/raw phone number such as "06 12345678".
phone_country_codes
repeated string
Optional ISO 3166-1 alpha-2 country codes to try when `phone` does not already include a leading "+" country code.
email
optional string
body
string
Message content in the app rich-text token format.
author_label
string
Optional human-readable sender label, for example the sender's name.
subject
string
Optional subject line, mainly relevant for email.
occurred_at
optional int64
Optional message timestamp (unix seconds). Defaults to the ingestion time.
conversation_external_id
string
Correlation with the source system. conversation_external_id groups messages into a thread; message_external_id makes ingestion idempotent.
message_external_id
string
customer_id
optional string
Optional exact customer. Requires read/write access and a contact point belonging to this customer. Only supported without integration_id: provider integrations reconcile their contact's customers separately.
AddCorrespondenceMessageResponse
Field
Type
Description
conversation_id
string
message_id
string
created
bool
False when an idempotent replay matched an existing message.
The endpoint returns 400 if the contact does not belong to the target, if
customerId and integrationId are combined, or if a replay targets a message
already linked to another customer (including a message linked to several
customers). It returns 403 when the key lacks write access to the customer.