curl --request POST \
--url https://apiv2.vodex.ai/v1/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"e164": "+14155551234",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownership": "platform",
"trunkId": "<string>",
"direction": {
"inbound": true,
"outbound": true
},
"label": "<string>"
}
'import requests
url = "https://apiv2.vodex.ai/v1/phone-numbers"
payload = {
"e164": "+14155551234",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownership": "platform",
"trunkId": "<string>",
"direction": {
"inbound": True,
"outbound": True
},
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
e164: '+14155551234',
assistantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ownership: 'platform',
trunkId: '<string>',
direction: {inbound: true, outbound: true},
label: '<string>'
})
};
fetch('https://apiv2.vodex.ai/v1/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://apiv2.vodex.ai/v1/phone-numbers",
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([
'e164' => '+14155551234',
'assistantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ownership' => 'platform',
'trunkId' => '<string>',
'direction' => [
'inbound' => true,
'outbound' => true
],
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apiv2.vodex.ai/v1/phone-numbers"
payload := strings.NewReader("{\n \"e164\": \"+14155551234\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ownership\": \"platform\",\n \"trunkId\": \"<string>\",\n \"direction\": {\n \"inbound\": true,\n \"outbound\": true\n },\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apiv2.vodex.ai/v1/phone-numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"e164\": \"+14155551234\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ownership\": \"platform\",\n \"trunkId\": \"<string>\",\n \"direction\": {\n \"inbound\": true,\n \"outbound\": true\n },\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/phone-numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"e164\": \"+14155551234\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ownership\": \"platform\",\n \"trunkId\": \"<string>\",\n \"direction\": {\n \"inbound\": true,\n \"outbound\": true\n },\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "num-14155551234",
"e164": "<string>",
"scope": "tenant",
"ownership": "platform",
"carrier": "twilio",
"trunkId": "<string>",
"region": "us",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": {
"inbound": true,
"outbound": true
},
"label": "<string>",
"configPublished": true
}{
"error": "not found"
}{
"error": "not found"
}Add a number
No trunkless numbers (§2.5). A platform number needs a carrier;
a byo-trunk number needs a trunkId whose trunk already declares that
E.164. A number has no region of its own: the tenant’s region
decides which cell serves it (0016 §3), so region is not accepted
here — sending it is a 400, not a silent drop.
Also republishes the number map to the cells and provisions the SIP gateway; a gateway failure is logged, not fatal — the record is durable.
curl --request POST \
--url https://apiv2.vodex.ai/v1/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"e164": "+14155551234",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownership": "platform",
"trunkId": "<string>",
"direction": {
"inbound": true,
"outbound": true
},
"label": "<string>"
}
'import requests
url = "https://apiv2.vodex.ai/v1/phone-numbers"
payload = {
"e164": "+14155551234",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownership": "platform",
"trunkId": "<string>",
"direction": {
"inbound": True,
"outbound": True
},
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
e164: '+14155551234',
assistantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ownership: 'platform',
trunkId: '<string>',
direction: {inbound: true, outbound: true},
label: '<string>'
})
};
fetch('https://apiv2.vodex.ai/v1/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://apiv2.vodex.ai/v1/phone-numbers",
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([
'e164' => '+14155551234',
'assistantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ownership' => 'platform',
'trunkId' => '<string>',
'direction' => [
'inbound' => true,
'outbound' => true
],
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apiv2.vodex.ai/v1/phone-numbers"
payload := strings.NewReader("{\n \"e164\": \"+14155551234\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ownership\": \"platform\",\n \"trunkId\": \"<string>\",\n \"direction\": {\n \"inbound\": true,\n \"outbound\": true\n },\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apiv2.vodex.ai/v1/phone-numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"e164\": \"+14155551234\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ownership\": \"platform\",\n \"trunkId\": \"<string>\",\n \"direction\": {\n \"inbound\": true,\n \"outbound\": true\n },\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/phone-numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"e164\": \"+14155551234\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ownership\": \"platform\",\n \"trunkId\": \"<string>\",\n \"direction\": {\n \"inbound\": true,\n \"outbound\": true\n },\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "num-14155551234",
"e164": "<string>",
"scope": "tenant",
"ownership": "platform",
"carrier": "twilio",
"trunkId": "<string>",
"region": "us",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": {
"inbound": true,
"outbound": true
},
"label": "<string>",
"configPublished": true
}{
"error": "not found"
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Body
"+14155551234"
The assistant's uuid, shown on its configure page in the console. Names and slugs are not accepted.
platform, byo-trunk twilio, vonage, exotel, vobiz Show child attributes
Show child attributes
Response
Added.
"num-14155551234"
platform marks a Vodex-owned shared caller ID: usable as fromNumberId for outbound calls and batches by every workspace, outbound-only, and read-only — PATCH and DELETE return 403. Distinct from ownership, which says whose carrier trunk the number rides.
tenant, platform platform, byo-trunk twilio, vonage, exotel, vobiz The number's MARKET, derived from its prefix on read. Never stored and never sent — the tenant's region decides which cell serves the number (0016 §3). Absent for a prefix in neither market.
us, in The assistant's uuid, shown on its configure page in the console. Names and slugs are not accepted.
Show child attributes
Show child attributes