List the messages of every chat of a contact
curl --request GET \
--url https://n-api.leadstaker.com/v1/contacts/{contactId}/messages \
--header 'x-api-key: <api-key>'import requests
url = "https://n-api.leadstaker.com/v1/contacts/{contactId}/messages"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://n-api.leadstaker.com/v1/contacts/{contactId}/messages', 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://n-api.leadstaker.com/v1/contacts/{contactId}/messages",
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-api-key: <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://n-api.leadstaker.com/v1/contacts/{contactId}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://n-api.leadstaker.com/v1/contacts/{contactId}/messages")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/contacts/{contactId}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6716d2a57e63cc0015b9f4d1",
"chatId": "6713cc481f52bb0014a7d3e9",
"type": "TEXT",
"sender": {
"type": "CONTACT",
"id": "6712a4d95b38ee0011c9f2b4",
"name": "Maria Andrade"
},
"timestamp": "2026-01-15T09:31:40.000Z",
"status": "RECEIVED",
"content": {
"type": "TEXT",
"content": {
"text": "Oi! Vocês atendem no sábado?"
}
}
}
],
"reactions": [],
"hasMore": false,
"limit": 30,
"offset": 0
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Messages
List the messages of every chat of a contact
Answers with the messages of the contact’s chats the caller can see, newest first, each carrying its chatId. Reads the 50 most recently updated chats, closed ones included, and test chats only with [with]=tests. Paginated by limit/offset, 30 per page by default, with hasMore; it does not count the total.
GET
/
v1
/
contacts
/
{contactId}
/
messages
List the messages of every chat of a contact
curl --request GET \
--url https://n-api.leadstaker.com/v1/contacts/{contactId}/messages \
--header 'x-api-key: <api-key>'import requests
url = "https://n-api.leadstaker.com/v1/contacts/{contactId}/messages"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://n-api.leadstaker.com/v1/contacts/{contactId}/messages', 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://n-api.leadstaker.com/v1/contacts/{contactId}/messages",
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-api-key: <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://n-api.leadstaker.com/v1/contacts/{contactId}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://n-api.leadstaker.com/v1/contacts/{contactId}/messages")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/contacts/{contactId}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6716d2a57e63cc0015b9f4d1",
"chatId": "6713cc481f52bb0014a7d3e9",
"type": "TEXT",
"sender": {
"type": "CONTACT",
"id": "6712a4d95b38ee0011c9f2b4",
"name": "Maria Andrade"
},
"timestamp": "2026-01-15T09:31:40.000Z",
"status": "RECEIVED",
"content": {
"type": "TEXT",
"content": {
"text": "Oi! Vocês atendem no sábado?"
}
}
}
],
"reactions": [],
"hasMore": false,
"limit": 30,
"offset": 0
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Path Parameters
Minimum string length:
1Query Parameters
How many records to return, at most 250.
Required range:
1 <= x <= 250How many records to skip.
Required range:
x >= 0tests also reads the contact's test chats.
Minimum string length:
1