curl --request GET \
--url https://{domain}/api/v1/conversations/{contact}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://{domain}/api/v1/conversations/{contact}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{domain}/api/v1/conversations/{contact}/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://{domain}/api/v1/conversations/{contact}/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 => [
"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://{domain}/api/v1/conversations/{contact}/messages"
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://{domain}/api/v1/conversations/{contact}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/conversations/{contact}/messages")
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_bodyList a conversation's messages
The thread, oldest first, paginated — so a client appends pages instead of reversing them. Each message carries referral: null unless it came from a Click-to-WhatsApp, Click-to-Messenger or Click-to-Instagram ad (or an m.me / ig.me ref link), and then the same keys on every channel: source (ad, post or link), ad_id, ad_title, body, photo_url, video_url, thumbnail_url, source_url, post_id, product_id (the catalog product the ad showed, for a catalog ad), ref and ctwa_clid (WhatsApp only). A key Meta did not send is null; media URLs are Meta CDN links and expire. When somebody who already has a Messenger or Instagram thread taps an ad, Meta sends no message, so an inbound line reading Opened the chat from an ad is recorded carrying the referral. Ad details are captured while click-to-message ad triggers are enabled for the workspace.
Required permission: salesbot:conversations:read
curl --request GET \
--url https://{domain}/api/v1/conversations/{contact}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://{domain}/api/v1/conversations/{contact}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{domain}/api/v1/conversations/{contact}/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://{domain}/api/v1/conversations/{contact}/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 => [
"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://{domain}/api/v1/conversations/{contact}/messages"
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://{domain}/api/v1/conversations/{contact}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/conversations/{contact}/messages")
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