List Numbers
curl --request GET \
--url https://api.agents.timepay.ai/api/v1/numbers/searchNumbers \
--header 'Authorization: <authorization>'import requests
url = "https://api.agents.timepay.ai/api/v1/numbers/searchNumbers"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.agents.timepay.ai/api/v1/numbers/searchNumbers', 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.agents.timepay.ai/api/v1/numbers/searchNumbers",
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: <authorization>"
],
]);
$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.agents.timepay.ai/api/v1/numbers/searchNumbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.agents.timepay.ai/api/v1/numbers/searchNumbers")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.timepay.ai/api/v1/numbers/searchNumbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"data": [
{
"number": "+919876543210",
"sms_enabled": false,
"voice_enabled": true
},
{
"number": "+918765432109",
"sms_enabled": false,
"voice_enabled": true
}
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"message": "Found Available Phone Numbers"
}
{
"success": false,
"status": 404,
"message": "No Available Numbers Found for this provider!"
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"status": 500,
"message": "Failed to get numbers"
}
Numbers Management
List Numbers
Search for available phone numbers across different telephony providers.
List Numbers
curl --request GET \
--url https://api.agents.timepay.ai/api/v1/numbers/searchNumbers \
--header 'Authorization: <authorization>'import requests
url = "https://api.agents.timepay.ai/api/v1/numbers/searchNumbers"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.agents.timepay.ai/api/v1/numbers/searchNumbers', 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.agents.timepay.ai/api/v1/numbers/searchNumbers",
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: <authorization>"
],
]);
$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.agents.timepay.ai/api/v1/numbers/searchNumbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.agents.timepay.ai/api/v1/numbers/searchNumbers")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.timepay.ai/api/v1/numbers/searchNumbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"data": [
{
"number": "+919876543210",
"sms_enabled": false,
"voice_enabled": true
},
{
"number": "+918765432109",
"sms_enabled": false,
"voice_enabled": true
}
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"message": "Found Available Phone Numbers"
}
{
"success": false,
"status": 404,
"message": "No Available Numbers Found for this provider!"
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"status": 500,
"message": "Failed to get numbers"
}
Headers
string
required
Bearer token for authentication (e.g.,
Bearer <your_token>).Query Parameters
string
default:"timepay"
Telephony provider alias name.
string
default:"IN"
Two-letter ISO country code.
integer
default:10
Maximum number of results to return.
integer
default:1
The page number for pagination.
string
Limited support: Pattern or prefix to search for within the phone numbers.
Response
boolean
Indicates if the request was successful.
integer
HTTP status code of the response.
array
integer
The current page number (returned for Vobiz and Plivo).
integer
Total number of pages available.
integer
Total number of available numbers matching the query.
string
Descriptive response message.
{
"success": true,
"status": 200,
"data": [
{
"number": "+919876543210",
"sms_enabled": false,
"voice_enabled": true
},
{
"number": "+918765432109",
"sms_enabled": false,
"voice_enabled": true
}
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"message": "Found Available Phone Numbers"
}
{
"success": false,
"status": 404,
"message": "No Available Numbers Found for this provider!"
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"status": 500,
"message": "Failed to get numbers"
}

