Get all phone numbers
curl --request GET \
--url https://app.botrep.ai/api/user/phone-numbers/all \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.botrep.ai/api/user/phone-numbers/all"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.botrep.ai/api/user/phone-numbers/all', 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://app.botrep.ai/api/user/phone-numbers/all",
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://app.botrep.ai/api/user/phone-numbers/all"
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://app.botrep.ai/api/user/phone-numbers/all")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.botrep.ai/api/user/phone-numbers/all")
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": 1,
"phone_number": "+14155551234",
"country_code": "US",
"type": "normal",
"type_label": "Dedicated Number",
"sms_capable": true,
"region": "us1",
"has_active_subscription": true,
"created_at": "2025-01-08T10:30:00.000000Z"
},
{
"id": 2,
"phone_number": "+442071234567",
"country_code": "GB",
"type": "normal",
"type_label": "Dedicated Number",
"sms_capable": false,
"region": "us1",
"has_active_subscription": true,
"created_at": "2025-01-05T14:20:00.000000Z"
}
]
}
Phone Numbers
Get all phone numbers
Get all phone numbers owned by the authenticated user
GET
/
user
/
phone-numbers
/
all
Get all phone numbers
curl --request GET \
--url https://app.botrep.ai/api/user/phone-numbers/all \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.botrep.ai/api/user/phone-numbers/all"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.botrep.ai/api/user/phone-numbers/all', 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://app.botrep.ai/api/user/phone-numbers/all",
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://app.botrep.ai/api/user/phone-numbers/all"
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://app.botrep.ai/api/user/phone-numbers/all")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.botrep.ai/api/user/phone-numbers/all")
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": 1,
"phone_number": "+14155551234",
"country_code": "US",
"type": "normal",
"type_label": "Dedicated Number",
"sms_capable": true,
"region": "us1",
"has_active_subscription": true,
"created_at": "2025-01-08T10:30:00.000000Z"
},
{
"id": 2,
"phone_number": "+442071234567",
"country_code": "GB",
"type": "normal",
"type_label": "Dedicated Number",
"sms_capable": false,
"region": "us1",
"has_active_subscription": true,
"created_at": "2025-01-05T14:20:00.000000Z"
}
]
}
This endpoint returns a list of all phone numbers associated with your account, including their subscription status and capabilities.
Response
Array of phone number objects
Show phone number properties
Show phone number properties
The unique identifier of the phone number
The phone number in E.164 format (e.g., +14155551234)
The ISO 3166-1 alpha-2 country code (e.g., US, GB, AU)
The type of phone number:
normal, sip, or caller_idHuman-readable label for the phone number type
Whether the phone number can send and receive SMS
The region where the phone number is provisioned
Whether the phone number has an active subscription
ISO 8601 timestamp of when the phone number was purchased
{
"data": [
{
"id": 1,
"phone_number": "+14155551234",
"country_code": "US",
"type": "normal",
"type_label": "Dedicated Number",
"sms_capable": true,
"region": "us1",
"has_active_subscription": true,
"created_at": "2025-01-08T10:30:00.000000Z"
},
{
"id": 2,
"phone_number": "+442071234567",
"country_code": "GB",
"type": "normal",
"type_label": "Dedicated Number",
"sms_capable": false,
"region": "us1",
"has_active_subscription": true,
"created_at": "2025-01-05T14:20:00.000000Z"
}
]
}
There is also a legacy endpoint
GET /user/phone-numbers that returns only SMS-capable phone numbers with active subscriptions. Use this /all endpoint if you need all phone numbers regardless of SMS capability or subscription status.⌘I

