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"
}Body
application/json