Skip to main content
GET
/
list-available-numbers
/list-available-numbers
curl --request GET \
  --url https://api.daily.co/v1/list-available-numbers \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.daily.co/v1/list-available-numbers"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.daily.co/v1/list-available-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://api.daily.co/v1/list-available-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: 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://api.daily.co/v1/list-available-numbers"

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://api.daily.co/v1/list-available-numbers")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.daily.co/v1/list-available-numbers")

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
{
  "total_count": 6,
  "data": [
    {
      "phoneNumber": "+13058700061",
      "region": "FL"
    },
    {
      "phoneNumber": "+13058700062",
      "region": "FL"
    },
    {
      "phoneNumber": "+13058700063",
      "region": "FL"
    },
    {
      "phoneNumber": "+13058700064",
      "region": "FL"
    },
    {
      "phoneNumber": "+13058700065",
      "region": "FL"
    },
    {
      "phoneNumber": "+13058700066",
      "region": "FL"
    }
  ]
}
{
"error": "validation-error",
"info": "invalid path parameter"
}
{
"error": "vendor-unavailable",
"info": "Phone number unavailable"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

areacode
string

An areacode to search within.

region
string

A region or state to search within. Must be an ISO 3166-2 alpha-2 code, i.e. CA for California. Cannot be used in combination with areacode.

city
string

A specific City to search within. Example, New York. The string must be url encoded because it is a url parameter. Must be used in combination with region. Cannot be used in combination with areacode, starts_with, contains, or ends_with.

contains
string

A string of 3 to 7 digits that should appear somewhere in the number.

starts_with
string

A string of 3 to 7 digits that should be used as the start of a number. Cannot be used in combination with contains or ends_with.

ends_with
string

A string of 3 to 7 digits that should be used as the end of a number. Cannot be used in combination with starts_with or contains.

Response

200