Retrieve a conversation
curl --request GET \
--url https://app.livechatai.com/api/v2/conversations/{conversationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.livechatai.com/api/v2/conversations/{conversationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.livechatai.com/api/v2/conversations/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.livechatai.com/api/v2/conversations/{conversationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.livechatai.com/api/v2/conversations/{conversationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.livechatai.com/api/v2/conversations/{conversationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.livechatai.com/api/v2/conversations/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "chat_1234567890",
"contactId": "contact_1234567890",
"agentId": "clx1234567890abcdef",
"isResolved": false,
"isAgent": false,
"isMuted": false,
"isStarred": false,
"integrationType": "WHATSAPP",
"lastMessageDate": "2024-01-20T14:45:00Z",
"lastVisitorMessageDate": "2024-01-20T14:30:00Z",
"lastBotMessageDate": "2024-01-20T14:45:00Z",
"lastAgentMessageDate": "2024-01-19T10:00:00Z",
"agent": {
"id": "agent_1234567890",
"name": "Jane Smith",
"email": "jane@company.com",
"avatar": "https://example.com/avatar.jpg"
},
"messages": [
{
"id": "msg_1234567890",
"content": "What are your business hours?",
"role": "user",
"type": "TEXT",
"attachments": [
{
"id": "<string>",
"url": "<string>",
"name": "<string>",
"mimeType": "<string>",
"size": 123
}
],
"source": [
{
"id": "src_1234567890",
"type": "WEBSITE",
"link": "https://example.com/page",
"distance": 0.85
}
],
"agent": {
"id": "agent_1234567890",
"name": "Jane Smith",
"email": "jane@company.com",
"avatar": "https://example.com/avatar.jpg"
},
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
}Conversations
Retrieve a conversation
Retrieve details of a specific conversation including messages
GET
/
api
/
v2
/
conversations
/
{conversationId}
Retrieve a conversation
curl --request GET \
--url https://app.livechatai.com/api/v2/conversations/{conversationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.livechatai.com/api/v2/conversations/{conversationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.livechatai.com/api/v2/conversations/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.livechatai.com/api/v2/conversations/{conversationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.livechatai.com/api/v2/conversations/{conversationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.livechatai.com/api/v2/conversations/{conversationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.livechatai.com/api/v2/conversations/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "chat_1234567890",
"contactId": "contact_1234567890",
"agentId": "clx1234567890abcdef",
"isResolved": false,
"isAgent": false,
"isMuted": false,
"isStarred": false,
"integrationType": "WHATSAPP",
"lastMessageDate": "2024-01-20T14:45:00Z",
"lastVisitorMessageDate": "2024-01-20T14:30:00Z",
"lastBotMessageDate": "2024-01-20T14:45:00Z",
"lastAgentMessageDate": "2024-01-19T10:00:00Z",
"agent": {
"id": "agent_1234567890",
"name": "Jane Smith",
"email": "jane@company.com",
"avatar": "https://example.com/avatar.jpg"
},
"messages": [
{
"id": "msg_1234567890",
"content": "What are your business hours?",
"role": "user",
"type": "TEXT",
"attachments": [
{
"id": "<string>",
"url": "<string>",
"name": "<string>",
"mimeType": "<string>",
"size": 123
}
],
"source": [
{
"id": "src_1234567890",
"type": "WEBSITE",
"link": "https://example.com/page",
"distance": 0.85
}
],
"agent": {
"id": "agent_1234567890",
"name": "Jane Smith",
"email": "jane@company.com",
"avatar": "https://example.com/avatar.jpg"
},
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the conversation to retrieve
Example:
"chat_1234567890"
⌘I

