Place an outbound call
curl --request POST \
--url https://api.omnia-voice.com/api/v1/calls/outbound \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agentId": "<string>",
"phoneNumber": "+358401234567"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '<string>', phoneNumber: '+358401234567'})
};
fetch('https://api.omnia-voice.com/api/v1/calls/outbound', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omnia-voice.com/api/v1/calls/outbound"
payload = {
"agentId": "<string>",
"phoneNumber": "+358401234567"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"sessionId": "<string>",
"status": "<string>",
"websocketUrl": "<string>",
"phoneNumber": "<string>",
"fromNumber": "<string>",
"agent": {
"id": "<string>",
"name": "<string>",
"description": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z"
}Calls
Place an outbound call
Have an agent call a number. The agent always waits for the callee to
speak first, regardless of the agent’s configured firstSpeaker — the
person answering says hello.
Supply the originating number as either fromNumberId (preferred) or
fromNumber in E.164 form. Exactly one is required.
POST
/
calls
/
outbound
Place an outbound call
curl --request POST \
--url https://api.omnia-voice.com/api/v1/calls/outbound \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agentId": "<string>",
"phoneNumber": "+358401234567"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '<string>', phoneNumber: '+358401234567'})
};
fetch('https://api.omnia-voice.com/api/v1/calls/outbound', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omnia-voice.com/api/v1/calls/outbound"
payload = {
"agentId": "<string>",
"phoneNumber": "+358401234567"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"sessionId": "<string>",
"status": "<string>",
"websocketUrl": "<string>",
"phoneNumber": "<string>",
"fromNumber": "<string>",
"agent": {
"id": "<string>",
"name": "<string>",
"description": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z"
}Authorizations
API key for authentication
Body
application/json
The agent that will place the call. Must be ACTIVE.
Destination number in E.164 format.
Example:
"+358401234567"
ID of one of your numbers to call from.
One of your numbers in E.164 form, as an alternative to fromNumberId.