List phone numbers
curl --request GET \
--url https://api.instaview.sk/phone-numbers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instaview.sk/phone-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.instaview.sk/phone-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.instaview.sk/phone-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.instaview.sk/phone-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.instaview.sk/phone-numbers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/phone-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{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"number": "+14155552671",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"capabilities": "OUTBOUND",
"custom": false,
"provider": "TWILIO",
"status": "AVAILABLE",
"numberType": "LOCAL",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-06-01T08:00:00.000Z",
"location": "New York, US"
}
],
"total": 3,
"page": 1,
"limit": 20,
"totalPages": 1
}Phone Numbers
List Phone Numbers
Lists active phone numbers assigned to the API key’s company. Use the returned id when referencing a phone number in an agent configuration. ATS keys must supply the companyId query parameter.
GET
/
phone-numbers
List phone numbers
curl --request GET \
--url https://api.instaview.sk/phone-numbers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instaview.sk/phone-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.instaview.sk/phone-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.instaview.sk/phone-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.instaview.sk/phone-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.instaview.sk/phone-numbers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/phone-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{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"number": "+14155552671",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"capabilities": "OUTBOUND",
"custom": false,
"provider": "TWILIO",
"status": "AVAILABLE",
"numberType": "LOCAL",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-06-01T08:00:00.000Z",
"location": "New York, US"
}
],
"total": 3,
"page": 1,
"limit": 20,
"totalPages": 1
}Lists all active phone numbers assigned to the API key’s company.
Overview
The list phone numbers endpoint returns all phone numbers currently assigned to your company. Use the phone numberid field when configuring agents for outbound or inbound calls.
Use Cases
- Agent Configuration: Retrieve phone number IDs before creating or updating agents
- Number Inventory: Audit which numbers are assigned to your company
- Capability Check: Verify whether numbers support outbound, inbound, or both call directions
ATS Keys
ATS partner keys must supply thecompanyId query parameter to specify which child company’s phone numbers to list. Regular company API keys automatically scope the response to their own company.
Basic Usage
GET /phone-numbers
With Pagination
// Get a specific page
GET /phone-numbers?page=2&limit=50
// Response includes pagination metadata
{
"data": [...],
"total": 5,
"page": 2,
"limit": 50,
"totalPages": 1
}
Finding a Phone Number for an Agent
// Retrieve phone numbers and pick one for agent configuration
async function getPhoneNumberForAgent() {
const response = await fetch("https://api.instaview.sk/phone-numbers", {
headers: { Authorization: `Bearer ${apiKey}` },
});
const { data } = await response.json();
// Use the `id` field when creating or updating an agent
const outbound = data.find(
(pn) =>
pn.capabilities === "OUTBOUND" || pn.capabilities === "INBOUND_OUTBOUND",
);
return outbound?.id;
}
ATS Key Example
// ATS partner key — scope to a specific child company
GET /phone-numbers?companyId=123e4567-e89b-12d3-a456-426614174000
Authorizations
API key for authentication using Bearer scheme
Query Parameters
Page number (1-based)
Required range:
1 <= x <= 10000Example:
1
Number of items per page
Required range:
1 <= x <= 100Example:
20
Company ID (required for ATS keys, optional for regular keys)
Example:
"123e4567-e89b-12d3-a456-426614174000"
Response
200 - application/json