Add voice number
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/voice-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"number": "<string>",
"connectionId": "<string>"
}
'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/voice-numbers"
payload = {
"provider": "<string>",
"number": "<string>",
"connectionId": "<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({provider: '<string>', number: '<string>', connectionId: '<string>'})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/voice-numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Numbers
Add voice number
Register a phone number from a connected provider
POST
/
voice-numbers
Add voice number
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/voice-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"number": "<string>",
"connectionId": "<string>"
}
'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/voice-numbers"
payload = {
"provider": "<string>",
"number": "<string>",
"connectionId": "<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({provider: '<string>', number: '<string>', connectionId: '<string>'})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/voice-numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Registers a number you already own at a connected telephony provider so agents
can place and receive calls on it. Connect the provider first — see
List integrations.
Body parameters
string
required
Telephony provider — one of
PLIVO, TWILIO, ACEFONE, EXOTELstring
required
The phone number in E.164 format, e.g.
+14155551234string
required
UUID of the connected provider integration this number belongs to. Get it from
List integrations — it’s the
id of the telephony integration for your provider. Must be a valid UUID.string
Agent to assign the number to. Can be attached later instead. Must be a valid UUID.
boolean
default:"true"
Whether the number is available for use
curl -X POST https://prod-comms-engine-api.20x.business/api/v1/voice-numbers \
-H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "TWILIO",
"number": "+14155551234",
"connectionId": "123e4567-e89b-12d3-a456-426614174000",
"agentId": "AGENT_ID"
}'
requests.post(
"https://prod-comms-engine-api.20x.business/api/v1/voice-numbers",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"provider": "TWILIO",
"number": "+14155551234",
"connectionId": "123e4567-e89b-12d3-a456-426614174000",
"agentId": "AGENT_ID",
},
)
await fetch("https://prod-comms-engine-api.20x.business/api/v1/voice-numbers", {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
provider: "TWILIO",
number: "+14155551234",
connectionId: "123e4567-e89b-12d3-a456-426614174000",
agentId: "AGENT_ID",
}),
});
Updating and removing numbers stays restricted to the dashboard —
PATCH and
DELETE /voice-numbers/{id} reject API keys.
