- Print
- PDF
Outbound Call Request API
The Outbound Request API allows external systems or users to initiate outbound calls through the IVR (Interactive Voice Response) system. This API is primarily used to queue and manage automated call requests for various projects, such as customer support, or appointment reminders.
1. Get Token
Endpoint:
URL: https://{{baseUrl}}/connect/token
HTTP Method: POST
Content Type: application/json
Here's an example of a request:
curl --location 'https://{{baseUrl}}/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id={{client_id}}' \
--data-urlencode 'client_secret={{client_secret}}'
Note: The Client ID requires the outboundmanager_external
scope.
Expected Response:
{
"access_token": "{{outbound_access_token}}",
"token_type": "Bearer",
"expires_in": {{}},
"scope": "outboundmanager_external"
}
2. Create Request
Endpoint:
URL: https://{{baseUrl}}/api/external/outbound/call-request
HTTP Method: POST
Content Type: application/json
Here's an example of a request:
curl --location 'https://{{baseUrl}}/api/external/outbound/call-request' \
--header 'Authorization: Bearer {{outbound_access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"projectName": "{{ProjectName}}",
"callRequests": [
{
"callRequestId": "facfef56-4431-4511-9093-c43dfeb85584",
"channelId": "ivr-external",
"endUser": {
"name": "John Doe",
"phone": "05xxxxxxxxx",
"email": "john.doe@sestek.com"
},
"parameters": [
{
"name": "_DisplayNumber",
"value": "DisplayNumber"
},
{
"name": "{{variable1}}",
"value": "{{value1}}"
},
{
"name": "{{variable2}}",
"value": "{{value2}}"
}
],
"locale": ""
},
{
"callRequestId": "facfef56-4431-4511-9093-c43dfeb82274",
"channelId": "ivr-external",
"endUser": {
"name": "Eleanor West",
"phone": "05xxxxxxxxx",
"email": "eleanor.west@sestek.com"
},
"parameters": [
{
"name": "_DisplayNumber",
"value": "DisplayNumber"
},
{
"name": "{{variable1}}",
"value": "{{value1}}"
},
{
"name": "{{variable2}}",
"value": "{{value2}}"
}
],
"locale": ""
}
]
}
Please ensure that the following fields are unique for each request:
- Phone: Each phone number must be unique to avoid conflicts when processing multiple call requests.
- callRequestId: This identifier must be unique for each request to correctly track and manage the individual call transactions.
- Parameters: The set of parameters provided should be unique for each request to ensure the proper handling and execution of the call with the correct values.
The following parameters can be provided in the request body:
Parameter | Description | Required |
---|---|---|
projectName | Name of the project | Yes |
Authorization | Bearer token | Yes |
callRequestId | Call Request ID | Yes |
channelId | Channel ID information | Yes |
endUser | End user information. Phone is required | Yes |
parameters | Display Number and project variables are provided | No |
locale | Locale of the conversation | No |
Expected Response:
{
"OutboundRequestId": ""
}