curl --request GET \
--url https://my.cloudtalk.io/api/numbers/index.json \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://my.cloudtalk.io/api/numbers/index.json"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://my.cloudtalk.io/api/numbers/index.json', 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://my.cloudtalk.io/api/numbers/index.json",
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: Basic <encoded-value>"
],
]);
$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://my.cloudtalk.io/api/numbers/index.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://my.cloudtalk.io/api/numbers/index.json")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/numbers/index.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"responseData": {
"itemsCount": 3,
"pageCount": 1,
"pageNumber": 1,
"limit": 3,
"data": [
{
"CallNumber": {
"id": "123",
"country_code": "44",
"area_code": "20",
"internal_name": "Sales support",
"caller_id_e164": 442012345678,
"is_redirected": false,
"connected_to": "1",
"source_id": "4"
}
}
]
}
}List numbers
Returns the phone numbers assigned to the account. Filter by id, country_code, area_code, what the number is connected_to, or is_free to show only numbers with no routing configured; page with limit and page.
curl --request GET \
--url https://my.cloudtalk.io/api/numbers/index.json \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://my.cloudtalk.io/api/numbers/index.json"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://my.cloudtalk.io/api/numbers/index.json', 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://my.cloudtalk.io/api/numbers/index.json",
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: Basic <encoded-value>"
],
]);
$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://my.cloudtalk.io/api/numbers/index.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://my.cloudtalk.io/api/numbers/index.json")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/numbers/index.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"responseData": {
"itemsCount": 3,
"pageCount": 1,
"pageNumber": 1,
"limit": 3,
"data": [
{
"CallNumber": {
"id": "123",
"country_code": "44",
"area_code": "20",
"internal_name": "Sales support",
"caller_id_e164": 442012345678,
"is_redirected": false,
"connected_to": "1",
"source_id": "4"
}
}
]
}
}Authorizations
HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).
Query Parameters
Filter by number ID
Filter by country calling code
Filter by local area code. Area code cannot contain 0 at the beginning
Filter by route type. 0 = 'group', 1 = 'agent', 2 = 'conference room', 3 = 'fax'
0, 1, 2, 3 Filter by availability. 0 = 'taken', 1 = 'free'
0, 1 Max. number of items in response data.
1 <= x <= 1000Number of page to return.
x >= 1Response
Numbers data
Show child attributes
Show child attributes