Outbound Call Request
The request
In the following example, we'll initiate a new outbound call from a pre-defined voice application. We'll assume the our information is as following:
Request Parameter | Description | Value Example |
---|---|---|
domain | The Cloudonix Domain being used for this request. If the domain name, provided in the URL and the API Key don't match, the request will be denied. | example.com |
destination | The remote destination to call, may be an actual phone number or a directly connected subscriber. | 63121233333 |
caller-id | The Caller ID number to present to the destination, when the call rings on their device. | 12127773456 |
application | The Cloudonix application ID or application name, as taken from the Cloudonix cockpit application. | 245 |
$ curl -X POST "https://api.cloudonix.io/calls/example.com/application" \
-H "Authorization: bearer XI1234567890" \
-H "Content-Type: application/json" \
-d '{
"destination": "63121233333",
"caller-id": "12127773456",
"application": 345
}'
The response
Pay Attention
The response will include a token
which is highly important to store. The token
will be later on used in other requests,
related to this session. The token
is a unique identifier that will be your Single Point of Truth when processing sessions,
contacting Cloudonix for support and more.
HTTP/1.1 200 OK
{
"domainId": 3,
"subscriberId": 372,
"destination": "63121233333",
"direction": "outbound-api",
"token": "16a7294c989b11e7b3d32b9edb8660c7"
}