cURL
curl -X GET 'https://api.telegent.com/v1.0/message/search?phoneNumber=%2B18015555555' \
-H 'Authorization: Bearer YOUR_TOKEN'import requests
url = "https://api.telegent.com/v1.0/message/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.telegent.com/v1.0/message/search', 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.telegent.com/v1.0/message/search",
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://api.telegent.com/v1.0/message/search"
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://api.telegent.com/v1.0/message/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/message/search")
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{
"PhoneNumber": "+18015555555",
"ResultsTotalRecords": 2,
"ResultsPages": 1,
"Results": [
{
"MessageID": "TMID-00348008102307aT03",
"Direction": "Inbound",
"Type": "a2p",
"CampaignID": "JCID-dsuhofh3882",
"Cost": "$0.0045",
"Status": "Received",
"To": [
{
"Number": "+12016093801"
},
{
"Number": "+12232233180"
}
],
"From": "+18018018011",
"Owner": "+18018018011",
"Body": "Hello there!!!",
"MmsMedia": [
{
"MediaUrl": "https://results2.com"
},
{
"MediaUrl": "https://results.com"
}
],
"MmsBase64": [
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "audio/wav"
},
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "video/mpg"
}
]
},
{
"MessageID": "TMID-00348008102307aT04",
"Direction": "Inbound",
"Type": "a2p",
"CampaignID": "JCID-dsuhofh3882",
"Cost": "$0.0045",
"Status": "Received",
"To": [
{
"Number": "+12016093801"
},
{
"Number": "+12232233180"
}
],
"From": "+18018018011",
"Owner": "+18018018011",
"Body": "Another TEST!!!",
"MmsMedia": [
{
"MediaUrl": "https://results2.com"
},
{
"MediaUrl": "https://results.com"
}
],
"MmsBase64": [
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "audio/wav"
},
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "video/mpg"
}
]
}
]
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Message
Message Search
Search your message history with filters for date range, phone numbers, direction (inbound/outbound), message status, and content. Returns paginated results with message details and delivery information.
What this does: Returns a paginated list of messages matching the search criteria. Results include message IDs, sender/recipient numbers, direction, status, and timestamps. Use this to audit message history or debug delivery issues for a specific number.
Next steps:
- Get full details for a specific message —
GET /v1.0/message/details - Filter messages —
GET /v1.0/message/filter
GET
/
v1.0
/
message
/
search
cURL
curl -X GET 'https://api.telegent.com/v1.0/message/search?phoneNumber=%2B18015555555' \
-H 'Authorization: Bearer YOUR_TOKEN'import requests
url = "https://api.telegent.com/v1.0/message/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.telegent.com/v1.0/message/search', 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.telegent.com/v1.0/message/search",
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://api.telegent.com/v1.0/message/search"
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://api.telegent.com/v1.0/message/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/message/search")
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{
"PhoneNumber": "+18015555555",
"ResultsTotalRecords": 2,
"ResultsPages": 1,
"Results": [
{
"MessageID": "TMID-00348008102307aT03",
"Direction": "Inbound",
"Type": "a2p",
"CampaignID": "JCID-dsuhofh3882",
"Cost": "$0.0045",
"Status": "Received",
"To": [
{
"Number": "+12016093801"
},
{
"Number": "+12232233180"
}
],
"From": "+18018018011",
"Owner": "+18018018011",
"Body": "Hello there!!!",
"MmsMedia": [
{
"MediaUrl": "https://results2.com"
},
{
"MediaUrl": "https://results.com"
}
],
"MmsBase64": [
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "audio/wav"
},
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "video/mpg"
}
]
},
{
"MessageID": "TMID-00348008102307aT04",
"Direction": "Inbound",
"Type": "a2p",
"CampaignID": "JCID-dsuhofh3882",
"Cost": "$0.0045",
"Status": "Received",
"To": [
{
"Number": "+12016093801"
},
{
"Number": "+12232233180"
}
],
"From": "+18018018011",
"Owner": "+18018018011",
"Body": "Another TEST!!!",
"MmsMedia": [
{
"MediaUrl": "https://results2.com"
},
{
"MediaUrl": "https://results.com"
}
],
"MmsBase64": [
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "audio/wav"
},
{
"Base64": "dkjjkdflajdfjo3ji3jjljfkjaskjfad",
"BaseType": "video/mpg"
}
]
}
]
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}⌘I