List phone numbers
curl --request GET \
--url https://api.upon-ai.com/api/numbers/{accountSid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.upon-ai.com/api/numbers/{accountSid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upon-ai.com/api/numbers/{accountSid}', 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.upon-ai.com/api/numbers/{accountSid}",
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.upon-ai.com/api/numbers/{accountSid}"
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.upon-ai.com/api/numbers/{accountSid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/numbers/{accountSid}")
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[
{
"id": 123,
"number": "<string>",
"base_number": "<string>",
"account_sid": "<string>",
"workspace_id": 123,
"agent_id": "<string>",
"default_agent_id": "<string>",
"inbound_agent_id": "<string>",
"inbound_agents": [
{
"agent_id": "<string>",
"agent_version": 123,
"weight": 123
}
],
"outbound_agents": [
{
"agent_id": "<string>",
"agent_version": 123,
"weight": 123
}
],
"inbound_agent_version": 123,
"outbound_agent_version": 123,
"application_sid": "<string>",
"phone_number_sid": "<string>",
"inbound_webhook_url": "<string>",
"is_time_routing_enabled": true,
"platform_import_error": true,
"platform_import_error_message": "<string>"
}
]{
"error": "<string>"
}Phone Numbers
List phone numbers
List phone numbers for an account the authenticated user can access.
GET
/
api
/
numbers
/
{accountSid}
List phone numbers
curl --request GET \
--url https://api.upon-ai.com/api/numbers/{accountSid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.upon-ai.com/api/numbers/{accountSid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upon-ai.com/api/numbers/{accountSid}', 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.upon-ai.com/api/numbers/{accountSid}",
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.upon-ai.com/api/numbers/{accountSid}"
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.upon-ai.com/api/numbers/{accountSid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/numbers/{accountSid}")
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[
{
"id": 123,
"number": "<string>",
"base_number": "<string>",
"account_sid": "<string>",
"workspace_id": 123,
"agent_id": "<string>",
"default_agent_id": "<string>",
"inbound_agent_id": "<string>",
"inbound_agents": [
{
"agent_id": "<string>",
"agent_version": 123,
"weight": 123
}
],
"outbound_agents": [
{
"agent_id": "<string>",
"agent_version": 123,
"weight": 123
}
],
"inbound_agent_version": 123,
"outbound_agent_version": 123,
"application_sid": "<string>",
"phone_number_sid": "<string>",
"inbound_webhook_url": "<string>",
"is_time_routing_enabled": true,
"platform_import_error": true,
"platform_import_error_message": "<string>"
}
]{
"error": "<string>"
}Authorizations
Generate tokens from your profile settings at app.uponai.com.
Path Parameters
Account SID that owns the phone numbers.
Response
Phone numbers for the requested account.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I