Create a call
curl --request POST \
--url https://api.omnia-voice.com/api/v1/calls \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agentId": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '<string>'})
};
fetch('https://api.omnia-voice.com/api/v1/calls', 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"
payload = { "agentId": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"status": "<string>",
"joinUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Calls
Create a call
Create a call session for a saved agent and receive a joinUrl to
connect to. Create this server-side so your API key is never exposed to
a browser; hand the client only the joinUrl.
POST
/
calls
Create a call
curl --request POST \
--url https://api.omnia-voice.com/api/v1/calls \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agentId": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '<string>'})
};
fetch('https://api.omnia-voice.com/api/v1/calls', 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"
payload = { "agentId": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"status": "<string>",
"joinUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Authorizations
API key for authentication
Body
application/json
The agent to run this call. Must be ACTIVE.
Falls back to the agent's assigned number when omitted.
Destination number, for outbound use.
Overrides the agent's own recording setting for this call.
Arbitrary values echoed back on the call record.