Get all messages for a webchat session (no auth)
curl --request GET \
--url https://your-instance.example.com/api/messages/webchat/{webchatId}import requests
url = "https://your-instance.example.com/api/messages/webchat/{webchatId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://your-instance.example.com/api/messages/webchat/{webchatId}', 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://your-instance.example.com/api/messages/webchat/{webchatId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://your-instance.example.com/api/messages/webchat/{webchatId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://your-instance.example.com/api/messages/webchat/{webchatId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/messages/webchat/{webchatId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"messages": [
{
"id": "67c0a0b0c0d0e0f0a0b0c0d0",
"text": "Hi! How can we help?",
"sender": "bot",
"timestamp": 1747571400000,
"attachments": [],
"senderInfo": {
"type": "AI",
"name": "Tether AI"
}
},
{
"id": "67c0a0b0c0d0e0f0a0b0c0d1",
"text": "I need a refund.",
"sender": "user",
"timestamp": 1747571410000
}
]
}{
"error": "Attachment not found",
"message": "Attachment not found"
}Messages
Get all messages for a webchat session (no auth)
Public endpoint used by the webchat widget to bootstrap the conversation history for a session. Returns sender metadata only when showSenderNameInWebchat is enabled on the webchat config.
GET
/
api
/
messages
/
webchat
/
{webchatId}
Get all messages for a webchat session (no auth)
curl --request GET \
--url https://your-instance.example.com/api/messages/webchat/{webchatId}import requests
url = "https://your-instance.example.com/api/messages/webchat/{webchatId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://your-instance.example.com/api/messages/webchat/{webchatId}', 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://your-instance.example.com/api/messages/webchat/{webchatId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://your-instance.example.com/api/messages/webchat/{webchatId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://your-instance.example.com/api/messages/webchat/{webchatId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/messages/webchat/{webchatId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"messages": [
{
"id": "67c0a0b0c0d0e0f0a0b0c0d0",
"text": "Hi! How can we help?",
"sender": "bot",
"timestamp": 1747571400000,
"attachments": [],
"senderInfo": {
"type": "AI",
"name": "Tether AI"
}
},
{
"id": "67c0a0b0c0d0e0f0a0b0c0d1",
"text": "I need a refund.",
"sender": "user",
"timestamp": 1747571410000
}
]
}{
"error": "Attachment not found",
"message": "Attachment not found"
}⌘I