Add/Update Phone Number
curl --request POST \
--url https://api.getoutbox.ai/settings/phone \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"friendly_name": "<string>",
"phone_number": "<string>",
"phone_number_id": "<string>",
"inbound_cost": 0,
"outbound_cost": 0,
"charge_per_second": false,
"rebill_on": false,
"sip_uri": "<string>",
"sip_username": "<string>",
"sip_password": "<string>"
}
'import requests
url = "https://api.getoutbox.ai/settings/phone"
payload = {
"friendly_name": "<string>",
"phone_number": "<string>",
"phone_number_id": "<string>",
"inbound_cost": 0,
"outbound_cost": 0,
"charge_per_second": False,
"rebill_on": False,
"sip_uri": "<string>",
"sip_username": "<string>",
"sip_password": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
friendly_name: '<string>',
phone_number: '<string>',
phone_number_id: '<string>',
inbound_cost: 0,
outbound_cost: 0,
charge_per_second: false,
rebill_on: false,
sip_uri: '<string>',
sip_username: '<string>',
sip_password: '<string>'
})
};
fetch('https://api.getoutbox.ai/settings/phone', 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.getoutbox.ai/settings/phone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'friendly_name' => '<string>',
'phone_number' => '<string>',
'phone_number_id' => '<string>',
'inbound_cost' => 0,
'outbound_cost' => 0,
'charge_per_second' => false,
'rebill_on' => false,
'sip_uri' => '<string>',
'sip_username' => '<string>',
'sip_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoutbox.ai/settings/phone"
payload := strings.NewReader("{\n \"friendly_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"inbound_cost\": 0,\n \"outbound_cost\": 0,\n \"charge_per_second\": false,\n \"rebill_on\": false,\n \"sip_uri\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoutbox.ai/settings/phone")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"friendly_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"inbound_cost\": 0,\n \"outbound_cost\": 0,\n \"charge_per_second\": false,\n \"rebill_on\": false,\n \"sip_uri\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoutbox.ai/settings/phone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"friendly_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"inbound_cost\": 0,\n \"outbound_cost\": 0,\n \"charge_per_second\": false,\n \"rebill_on\": false,\n \"sip_uri\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCompany Phone Numbers
Add/Update Phone Number
Add or update a phone number
POST
/
settings
/
phone
Add/Update Phone Number
curl --request POST \
--url https://api.getoutbox.ai/settings/phone \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"friendly_name": "<string>",
"phone_number": "<string>",
"phone_number_id": "<string>",
"inbound_cost": 0,
"outbound_cost": 0,
"charge_per_second": false,
"rebill_on": false,
"sip_uri": "<string>",
"sip_username": "<string>",
"sip_password": "<string>"
}
'import requests
url = "https://api.getoutbox.ai/settings/phone"
payload = {
"friendly_name": "<string>",
"phone_number": "<string>",
"phone_number_id": "<string>",
"inbound_cost": 0,
"outbound_cost": 0,
"charge_per_second": False,
"rebill_on": False,
"sip_uri": "<string>",
"sip_username": "<string>",
"sip_password": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
friendly_name: '<string>',
phone_number: '<string>',
phone_number_id: '<string>',
inbound_cost: 0,
outbound_cost: 0,
charge_per_second: false,
rebill_on: false,
sip_uri: '<string>',
sip_username: '<string>',
sip_password: '<string>'
})
};
fetch('https://api.getoutbox.ai/settings/phone', 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.getoutbox.ai/settings/phone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'friendly_name' => '<string>',
'phone_number' => '<string>',
'phone_number_id' => '<string>',
'inbound_cost' => 0,
'outbound_cost' => 0,
'charge_per_second' => false,
'rebill_on' => false,
'sip_uri' => '<string>',
'sip_username' => '<string>',
'sip_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoutbox.ai/settings/phone"
payload := strings.NewReader("{\n \"friendly_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"inbound_cost\": 0,\n \"outbound_cost\": 0,\n \"charge_per_second\": false,\n \"rebill_on\": false,\n \"sip_uri\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoutbox.ai/settings/phone")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"friendly_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"inbound_cost\": 0,\n \"outbound_cost\": 0,\n \"charge_per_second\": false,\n \"rebill_on\": false,\n \"sip_uri\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoutbox.ai/settings/phone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"friendly_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"inbound_cost\": 0,\n \"outbound_cost\": 0,\n \"charge_per_second\": false,\n \"rebill_on\": false,\n \"sip_uri\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Company API Key
Body
application/json
Phone number details
Available options:
phone_number, verified_caller_id Available options:
twilio, vonage, telnyx, sip For updates only
Required for SIP integration
Required for SIP integration
Required for SIP integration
Response
Phone number added/updated successfully
⌘I

