Conversations API
Chats on the website widget, WhatsApp and other channels.
The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.
GET/v1/conversations
List conversations
Returns chats with customers on the website widget, WhatsApp, Messenger and similar channels, most recently active first. Each row says who the customer is (when known), the last message, and how many messages the chat holds. In-app team chat is not included, and neither are chats that have no customer-channel message yet.
Open to a signed-in person or a personal access token whose role may manage settings or developer access. Secret and restricted API keys are not accepted here; use the /v1/events feed or webhooks to follow conversations from a server. Reading is free. The list is the organization's own, in the mode of the credentials used.
Paged, most recently active first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total.
channel filters on any message channel in the chat, but the channel shown on a row is the channel of the chat's most recent message, so a filtered list can show a different channel on a row.
Accepts: personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
channel | query | string | No | Only chats with a message on this channel, such as `web` or `whatsapp`. Empty means every channel. |
limit | query | integer | No | How many items to return. Default 50, at most 100. |
cursor | query | string | No | The `next_cursor` of the previous page. Opaque; never built by the client. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/conversations/{id}/messages
Messages in a conversation
Returns the messages of one chat, oldest first: who sent each one (the customer, the assistant or a person on the team), on which channel, and when. Messages that were deleted are left out.
Same access as the conversation list: a signed-in person or personal access token with the right role, not a secret or restricted key. Reading is free.
Paged, oldest first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total. An id that is not a conversation of this organization returns an empty page rather than 404.
Accepts: personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The resource id. |
limit | query | integer | No | How many items to return. Default 50, at most 100. |
cursor | query | string | No | The `next_cursor` of the previous page. Opaque; never built by the client. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/conversations/{id}/visitor
Website visitor details
Returns what is known about the website visitor in a chat that came from the widget: their address and roughly where it is, their browser, system and device, the page they chatted from, where they came from (referrer and campaign tags), their language, timezone and screen, and how many times this browser has visited.
Location comes from the edge's IP geolocation and is approximate: country always, region, city and postal code when the edge provides them. The widget never reads the website's cookies; the visit count is the widget's own.
latest is the most recent widget session and is null for chats that never came through the widget. Open to a signed-in person or a personal access token whose role may manage settings or developer access. Reading is free.
Accepts: personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The resource id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |