curl --request GET \
--url https://api.yo-lead.com/v1/tickets/{ticketId}/history \
--header 'X-YoLead-Key: <api-key>' \
--header 'X-YoLead-Signature: <api-key>' \
--header 'X-YoLead-Timestamp: <api-key>'import requests
url = "https://api.yo-lead.com/v1/tickets/{ticketId}/history"
headers = {
"X-YoLead-Key": "<api-key>",
"X-YoLead-Timestamp": "<api-key>",
"X-YoLead-Signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-YoLead-Key': '<api-key>',
'X-YoLead-Timestamp': '<api-key>',
'X-YoLead-Signature': '<api-key>'
}
};
fetch('https://api.yo-lead.com/v1/tickets/{ticketId}/history', 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://api.yo-lead.com/v1/tickets/{ticketId}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-YoLead-Key: <api-key>",
"X-YoLead-Signature: <api-key>",
"X-YoLead-Timestamp: <api-key>"
],
]);
$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://api.yo-lead.com/v1/tickets/{ticketId}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-YoLead-Key", "<api-key>")
req.Header.Add("X-YoLead-Timestamp", "<api-key>")
req.Header.Add("X-YoLead-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yo-lead.com/v1/tickets/{ticketId}/history")
.header("X-YoLead-Key", "<api-key>")
.header("X-YoLead-Timestamp", "<api-key>")
.header("X-YoLead-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yo-lead.com/v1/tickets/{ticketId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-YoLead-Key"] = '<api-key>'
request["X-YoLead-Timestamp"] = '<api-key>'
request["X-YoLead-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"ticket": {
"id": "64f000000000000000000003",
"chatId": "64f000000000000000000002",
"status": "active",
"assigneeId": "64f000000000000000000001",
"startedAt": "2026-05-08T11:00:00.000Z",
"attribution": {
"ad_id": "120000000000000001"
}
},
"messages": [
{
"id": "1756814400000",
"sentAt": "2026-05-08T11:01:00.000Z",
"fromId": "instagram-user-id",
"direction": "incoming",
"text": "Is this available?",
"attachments": [
{
"id": "64b000000000000000000002",
"kind": "image",
"fileName": "photo.jpg",
"mimeType": "image/jpeg",
"size": 4096
}
]
}
],
"nextChunkStartMessageId": "3604479123456789"
}
}Get ticket history
Returns ticket metadata and up to 20 messages for the API key company, ordered from newest to oldest. Email messages can include an optional subject. Telegram Bot, Telegram Account, MAX, VK, email, Facebook, Instagram, WhatsApp, and Avito messages can include attachment descriptors; Telegram album messages can also include mediaGroupId. Avito messages can include optional listing context with type, id, and optional title, price, and url. Messages can include an optional channel-supplied version. Existing stored messages are not automatically backfilled. Imported Telegram Account history can include attachment metadata, and VK provider history can include separate descriptors identified by source: vk.
The ticket can include acquisition attribution from supported Telegram Bot, MAX, VK, Instagram, Messenger, and WhatsApp events. Attribution is captured at ticket creation and preserved on subsequent messages and reopening.
This endpoint can read non-current tickets. History is unavailable for new tickets, but is available for pending_assignment tickets before assignment; their assigneeId is omitted. Stored history remains accessible after the company channel is disconnected or removed, subject to company access and plan restrictions; VK history read from the provider still requires an available channel and provider access. On plans with limited chat history, tickets older than 30 days return 403. If the response contains nextChunkStartMessageId, pass it as chunkLastMessageId to load the next chunk.
Required API key scope: read.
curl --request GET \
--url https://api.yo-lead.com/v1/tickets/{ticketId}/history \
--header 'X-YoLead-Key: <api-key>' \
--header 'X-YoLead-Signature: <api-key>' \
--header 'X-YoLead-Timestamp: <api-key>'import requests
url = "https://api.yo-lead.com/v1/tickets/{ticketId}/history"
headers = {
"X-YoLead-Key": "<api-key>",
"X-YoLead-Timestamp": "<api-key>",
"X-YoLead-Signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-YoLead-Key': '<api-key>',
'X-YoLead-Timestamp': '<api-key>',
'X-YoLead-Signature': '<api-key>'
}
};
fetch('https://api.yo-lead.com/v1/tickets/{ticketId}/history', 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://api.yo-lead.com/v1/tickets/{ticketId}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-YoLead-Key: <api-key>",
"X-YoLead-Signature: <api-key>",
"X-YoLead-Timestamp: <api-key>"
],
]);
$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://api.yo-lead.com/v1/tickets/{ticketId}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-YoLead-Key", "<api-key>")
req.Header.Add("X-YoLead-Timestamp", "<api-key>")
req.Header.Add("X-YoLead-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yo-lead.com/v1/tickets/{ticketId}/history")
.header("X-YoLead-Key", "<api-key>")
.header("X-YoLead-Timestamp", "<api-key>")
.header("X-YoLead-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yo-lead.com/v1/tickets/{ticketId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-YoLead-Key"] = '<api-key>'
request["X-YoLead-Timestamp"] = '<api-key>'
request["X-YoLead-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"ticket": {
"id": "64f000000000000000000003",
"chatId": "64f000000000000000000002",
"status": "active",
"assigneeId": "64f000000000000000000001",
"startedAt": "2026-05-08T11:00:00.000Z",
"attribution": {
"ad_id": "120000000000000001"
}
},
"messages": [
{
"id": "1756814400000",
"sentAt": "2026-05-08T11:01:00.000Z",
"fromId": "instagram-user-id",
"direction": "incoming",
"text": "Is this available?",
"attachments": [
{
"id": "64b000000000000000000002",
"kind": "image",
"fileName": "photo.jpg",
"mimeType": "image/jpeg",
"size": 4096
}
]
}
],
"nextChunkStartMessageId": "3604479123456789"
}
}