Skip to content

Get a conversation

get/get-conversation/{conversationId}
Any key

Get detailed information about a specific conversation, including messages, customer details if available, and metadata.

If chatbotId is provided, the conversation is retrieved from that chatbot. If chatbotId is not provided, the conversation is retrieved from any chatbot in your workspace (or, with a chatbot-scoped key, from that key's chatbot).

Parameters

Sending 1 of 2 fields
Required
conversationIdstring
The unique identifier of the conversation.
Try it · GET /get-conversation/{conversationId}
curl 'https://api.chat-data.com/api/v2/get-conversation/3f2b8c1e-9a4d-4e7b-8c2a-5d1e6f7a8b9c' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY"
Loading…

Responses

Successful response.

Content type: application/json

FieldDescription
statusstringOne of: success.
conversationobjectThe conversation.
conversation.conversationIdstringID of the conversation.
conversation.createdAtnumberWhen the conversation was created, in milliseconds since the Unix epoch.
conversation.lastMessageAtstringWhen the last message in the conversation was sent (ISO 8601), or when the conversation was created if that is not recorded. Only returned by get-conversation.
conversation.messagesarray of objectThe messages of the conversation, oldest first.
conversation.messages[].rolestringThe role of the message sender (user, assistant, or human for a live chat agent).
conversation.messages[].contentstringThe text content of the message.
conversation.messages[].isTranscriptbooleanIndicates whether the message is a transcript of the realtime voice-to-voice interaction.
conversation.messages[].upvotebooleanIndicates whether the message is upvoted by the user.
conversation.messages[].namestringThe name of the agent who sent the message, if the role is human.
conversation.messages[].avatarstringThe avatar image URL of the agent who sent the message, if the role is human.
conversation.messages[].timestampstringWhen the message was sent (ISO 8601).
conversation.messages[].midstringThe ID of the message.
conversation.messages[].reasoningstringThe model's reasoning for an assistant message, when it was recorded.
conversation.messages[].downvoteFeedbackstringThe user's feedback when they downvoted the message.
conversation.messages[].readbooleanIndicates whether the message has been read by the user or the agent.
conversation.messages[].filesarray of objectThe files attached to the message.
conversation.messages[].files[].namestringThe name of the file.
conversation.messages[].files[].typestringThe MIME type of the file.
conversation.messages[].files[].urlstringThe URL of the file in Azure Blob Storage. Use the /get-sas-token endpoint to get a URL with a SAS token for public access.
conversation.messages[].audioUrlstringThe URL of the audio file in Azure Blob Storage, when the message is a transcript of an audio input. Use the /get-sas-token endpoint to get a URL with a SAS token for public access.
conversation.messages[].scorenumberThe level of confidence in the generated answer. If no score is present, the answer was not derived from search results.
conversation.sourcestringWhere the conversation took place. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger.
conversation.requestedLiveChatbooleanWhether live chat support was requested in this conversation.
conversation.liveChatEndedbooleanWhether live chat has ended in this conversation.
conversation.chatbotIdstringThe ID of the chatbot.
conversation.ipAddressstringThe IP address of the user.
conversation.userCountrystringThe 2-letter ISO country code of the user, based on an IP address lookup (Unknown when it could not be resolved).
conversation.customerobjectThe lead attached to the conversation, if any. In conversations, source, ipAddress and userCountry are not included in it.
conversation.customer.leadIdstringThe unique identifier of the lead (UUID).
conversation.customer.namestringThe name provided by the customer.
conversation.customer.emailstringThe email address provided by the customer.
conversation.customer.phonestringThe phone number provided by the customer.
conversation.customer.psidstringThe page-scoped user ID of the customer, if the customer is from Messenger.
conversation.customer.ig_usernamestringThe Instagram username of the customer, if the customer is from Instagram.
conversation.customer.usernamestringSlack or Telegram username. A platform-specific identifier, distinct from ig_username (Instagram) and psid (Messenger).
conversation.customer.infostringAdditional information stored on the lead.
conversation.customer.sourcestringThe source the customer was acquired from. Only returned by get-customers. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger.
conversation.customer.ipAddressstringThe IP address of the customer. Only returned by get-customers.
conversation.customer.userCountrystringThe 2-letter ISO country code of the customer, based on an IP address lookup (Unknown when it could not be resolved). Only returned by get-customers.
conversation.customer.createdAtnumberWhen the customer's information was submitted, in milliseconds since the Unix epoch.
conversation.overalRatingnumberThe overall rating the user gave the conversation (1-5), if any.
conversation.browserAgentstringThe user agent string of the browser used in the conversation.
conversation.urlPathstringThe URL path where the conversation started, when the source is widget.

Example

{  "status": "success",  "conversation": {    "conversationId": "3f2b8c1e-9a4d-4e7b-8c2a-5d1e6f7a8b9c",    "createdAt": 1791970200000,    "messages": [      {        "role": "user",        "content": "What are your opening hours?",        "timestamp": "2026-10-14T09:30:00.000Z",        "read": true      },      {        "role": "assistant",        "content": "We're open Monday to Friday, 9am to 6pm EST. Outside those hours you can email [email protected].",        "timestamp": "2026-10-14T09:30:03.000Z",        "score": 0.87,        "upvote": true,        "read": true      },      {        "role": "user",        "content": "Thanks! Can I talk to someone about a refund?",        "timestamp": "2026-10-14T09:31:00.000Z",        "read": true      },      {        "role": "human",        "content": "Hi Jane, I'm Alex from the support team. I can help with your refund.",        "name": "Alex Chen",        "avatar": "https://example.blob.core.windows.net/chatfiles/6650f1c2a9e4b83d2c7a1f05/agent-avatar.png",        "timestamp": "2026-10-14T09:32:00.000Z",        "read": true      }    ],    "source": "widget",    "requestedLiveChat": true,    "liveChatEnded": false,    "chatbotId": "6650f1c2a9e4b83d2c7a1f05",    "ipAddress": "203.0.113.42",    "userCountry": "US",    "customer": {      "leadId": "8d0c2b6e-4f1a-4b7c-9e3d-2a5f6b7c8d9e",      "name": "Jane Doe",      "email": "[email protected]",      "phone": "+14155550123",      "createdAt": 1791970230000    },    "overalRating": 5,    "browserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0 Safari/537.36",    "urlPath": "/pricing"  }}

Last updated October 14, 2026