Place an outbound call.
curl --request POST \
--url https://omni-api.sendblue.com/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"to": "+14155550101",
"from": "+14155550100"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({to: '+14155550101', from: '+14155550100'})
};
fetch('https://omni-api.sendblue.com/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/calls"
payload = {
"to": "+14155550101",
"from": "+14155550100"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"direction": "inbound",
"status": "queued",
"to": "<string>",
"from": "<string>",
"parent_call_id": "<string>",
"answered_by": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_seconds": 123,
"price": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Place an outbound call.
Give the call its instructions as a TwiML document: inline in twiml,
or fetched from url when the call is answered. Exactly one of the two
is required. TwiML documents and every request Omni makes to your URLs
keep Twilio’s parameter names and X-Twilio-Signature. The price of
the longest possible call is held from the balance at acceptance.
Required permission: calls:create. Accepted credentials: a signed-in person, an API key, the account token.
POST
/
calls
Place an outbound call.
curl --request POST \
--url https://omni-api.sendblue.com/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"to": "+14155550101",
"from": "+14155550100"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({to: '+14155550101', from: '+14155550100'})
};
fetch('https://omni-api.sendblue.com/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/calls"
payload = {
"to": "+14155550101",
"from": "+14155550100"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"direction": "inbound",
"status": "queued",
"to": "<string>",
"from": "<string>",
"parent_call_id": "<string>",
"answered_by": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_seconds": 123,
"price": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret
Headers
Body
application/json
Response
The call was accepted and queued for dialing.