Make phone call
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/channels/voice/call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "<string>",
"voiceNumberId": "<string>",
"toNumber": "<string>"
}
'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/channels/voice/call"
payload = {
"agentId": "<string>",
"voiceNumberId": "<string>",
"toNumber": "<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({agentId: '<string>', voiceNumberId: '<string>', toNumber: '<string>'})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/channels/voice/call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Calls
Make phone call
Place an outbound call using an agent
POST
/
channels
/
voice
/
call
Make phone call
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/channels/voice/call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "<string>",
"voiceNumberId": "<string>",
"toNumber": "<string>"
}
'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/channels/voice/call"
payload = {
"agentId": "<string>",
"voiceNumberId": "<string>",
"toNumber": "<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({agentId: '<string>', voiceNumberId: '<string>', toNumber: '<string>'})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/channels/voice/call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Places a real outbound call. The agent answers and drives the conversation.
This places a real phone call and bills your wallet. Make sure your wallet
has balance and use a number you control while testing.
Body parameters
string
required
Agent that will handle the call, as a UUID
string
required
ID of a voice number already registered to your tenant (not a raw phone
number) — see Purchase Phone Numbers
string
required
Destination number, E.164 format — e.g.
+14155551234string
Your tenant ID. Omit it when authenticating with an API key — the tenant is
taken from the key itself
string
UUID of an existing contact to attribute the call to
string
Campaign reference
string
Campaign attempt reference
object
Arbitrary key/value data stored with the call session
curl -X POST https://prod-comms-engine-api.20x.business/api/v1/channels/voice/call \
-H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "AGENT_ID",
"voiceNumberId": "VOICE_NUMBER_ID",
"toNumber": "+919876543210"
}'
requests.post(
"https://prod-comms-engine-api.20x.business/api/v1/channels/voice/call",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"agentId": "AGENT_ID",
"voiceNumberId": "VOICE_NUMBER_ID",
"toNumber": "+919876543210",
},
)
Response
{ "sessionId": "660e8400-...", "jobId": "job_abc123", "status": "QUEUED" }
Don’t know your
voiceNumberId? List your registered numbers first with
GET /voice-numbers.
