Numbers
List Numbers
List the telephony numbers available to your organization
GET
/
api
/
v2
/
platform
/
telephony
/
numbers
/
Get Telephony Numbers
curl --request GET \
--url https://unpod.ai/api/v2/platform/telephony/numbers/ \
--header 'Authorization: <api-key>'import requests
url = "https://unpod.ai/api/v2/platform/telephony/numbers/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://unpod.ai/api/v2/platform/telephony/numbers/', 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://unpod.ai/api/v2/platform/telephony/numbers/",
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: <api-key>"
],
]);
$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://unpod.ai/api/v2/platform/telephony/numbers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://unpod.ai/api/v2/platform/telephony/numbers/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/numbers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status_code": 200,
"message": "Telephony numbers fetched successfully.",
"data": [
{ "id": 501, "number": "+15551234567", "state": "NOT_ASSIGNED", "active": true }
]
}
Returns the numbers available to you. Behavior depends on the
Org-Handle header:
- With Org-Handle — returns your organization’s own numbers (any state) plus the shared
unassigned pool (
NOT_ASSIGNED). - Without Org-Handle — returns only the shared unassigned pool.
id when attaching it to a trunk.
Prerequisites: API Token. See Authentication.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Token <your-api-key> |
| Org-Handle | string | No | Organization domain handle |
Number object fields
| Field | Type | Description |
|---|---|---|
| id | integer | Unique number id (use this in attach calls) |
| number | string | Phone number in E.164 format |
| state | string | NOT_ASSIGNED or ASSIGNED |
| active | boolean | Whether the number is usable |
{
"status_code": 200,
"message": "Telephony numbers fetched successfully.",
"data": [
{ "id": 501, "number": "+15551234567", "state": "NOT_ASSIGNED", "active": true }
]
}
cURL
curl -s "https://unpod.ai/api/v2/platform/telephony/numbers/" \
-H "Authorization: Token <your-api-key>" \
-H "Org-Handle: <your-org-handle>"
Was this page helpful?
⌘I
Get Telephony Numbers
curl --request GET \
--url https://unpod.ai/api/v2/platform/telephony/numbers/ \
--header 'Authorization: <api-key>'import requests
url = "https://unpod.ai/api/v2/platform/telephony/numbers/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://unpod.ai/api/v2/platform/telephony/numbers/', 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://unpod.ai/api/v2/platform/telephony/numbers/",
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: <api-key>"
],
]);
$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://unpod.ai/api/v2/platform/telephony/numbers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://unpod.ai/api/v2/platform/telephony/numbers/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/numbers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status_code": 200,
"message": "Telephony numbers fetched successfully.",
"data": [
{ "id": 501, "number": "+15551234567", "state": "NOT_ASSIGNED", "active": true }
]
}