Get pre-call context
Returns the contact, the latest conversation, the recent messages, and a text summary of a customer as 1 flat map of strings. An external voice agent can use each key as a template variable. Give 1 of conversation_id, contact_id, or phone_number. If the request has more than 1, the API reads them in that order. The endpoint only reads data.
Authentication
An API key that an administrator creates in Settings > Developer. The personal access token of a user does not work. A key reaches every inbox, conversation, and contact in the account that created it, and nothing in other accounts.
Path parameters
The id of your account. It is the number after /accounts/ in the dashboard URL.
Query parameters
The conversation number in the dashboard URL (display_id).
The phone number of the contact in E.164 format. The API adds the + if it is not there. The API uses the conversation of the contact with the most recent activity.
Response
visitor, lead, or customer.
The internal id of the conversation. It is not the number in the dashboard URL. The other developer endpoints take conversation_display_id.
1 line for each public message, oldest first, with the prefix user: or assistant:. The last 100 messages, up to 40,000 characters. Empty when there is no conversation.