curl --request GET \
--url https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread', 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-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread",
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-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread"
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-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread")
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{
"status_code": 123,
"data": "<unknown>",
"query_generated_time": 123,
"row_count": 1,
"limit": 2,
"current_page": 2,
"total_page_number": 1,
"next_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List SMS Thread
Get the full message history of one chat. Provide your side
(phone_number_id or number) and the counterpart side
(counterpart_phone_number_id or counterpart).
Messages come back newest-first. To load older messages when the user
scrolls up, pass the next_cursor from the previous response as
before_id — this keyset paging stays stable as new messages arrive.
curl --request GET \
--url https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread', 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-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread",
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-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread"
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-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/messages/thread")
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{
"status_code": 123,
"data": "<unknown>",
"query_generated_time": 123,
"row_count": 1,
"limit": 2,
"current_page": 2,
"total_page_number": 1,
"next_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Your side: the owned phone number's id (preferred; works after delete/reassign).
Your side as a raw number (fallback when not a saved number).
The other party's owned phone number id (from the conversation list).
The other party as a raw number (fallback / external numbers).
The oldest message you already loaded; returns the next-older page. Omit to get the latest messages.
How many messages to return per page (1 to 200).
1 <= x <= 200Response
Successful Response
Standard response wrapper for list responses.
Declare ListResponse[list[SomeModel]] to render the real data
array schema in OpenAPI/Swagger; a bare ListResponse leaves data
untyped.
HTTP status code for the response.
Payload or error details.
UTC timestamp (milliseconds since epoch) when response was generated.
Total rows matching the request filters (not just this page).
x >= 0Page size used for this response. Null for cursor-paginated endpoints.
x >= 11-indexed page number for this response. Null for cursor-paginated endpoints.
x >= 1Total number of pages given the current limit. Null for cursor-paginated endpoints.
x >= 0Cursor for the next page, if available.

