curl --request GET \
--url https://api.statisfy.com/v1/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/conversations/{conversation_id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/conversations/{conversation_id}/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://api.statisfy.com/v1/conversations/{conversation_id}/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://api.statisfy.com/v1/conversations/{conversation_id}/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://api.statisfy.com/v1/conversations/{conversation_id}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/conversations/{conversation_id}/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{
"data": [
{
"id": "<string>",
"text": "<string>",
"ai_written": false,
"attachments": [
{
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123
}
],
"automated": "<string>",
"cc": [
"<string>"
],
"direction": "inbound",
"role": "customer",
"sender": {
"email": "<string>",
"id": "<string>",
"name": "<string>",
"type": "user"
},
"sent_at": "<string>",
"subject": "<string>",
"to": [
"<string>"
]
}
],
"has_more": false,
"next_cursor": "<string>"
}List a conversation's messages
Pages through the messages of a conversation’s thread, oldest first (limit, default 100, at most 500; pass next_cursor back as cursor while has_more; a cursor from another conversation is a 400). Each says who wrote it (role: customer, user, digital_worker or system), which way it went (direction) and whether an AI wrote it (ai_written), with its sender, an email’s recipients (never bcc) and subject, its text as stored, and its attachments by name. AI drafts no one has sent are not messages, and never appear. This reads the conversations’ words: grant conversations:read only to an integration that may read them.
curl --request GET \
--url https://api.statisfy.com/v1/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/conversations/{conversation_id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/conversations/{conversation_id}/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://api.statisfy.com/v1/conversations/{conversation_id}/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://api.statisfy.com/v1/conversations/{conversation_id}/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://api.statisfy.com/v1/conversations/{conversation_id}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/conversations/{conversation_id}/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{
"data": [
{
"id": "<string>",
"text": "<string>",
"ai_written": false,
"attachments": [
{
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123
}
],
"automated": "<string>",
"cc": [
"<string>"
],
"direction": "inbound",
"role": "customer",
"sender": {
"email": "<string>",
"id": "<string>",
"name": "<string>",
"type": "user"
},
"sent_at": "<string>",
"subject": "<string>",
"to": [
"<string>"
]
}
],
"has_more": false,
"next_cursor": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Query Parameters
Was this page helpful?