Outbound Call Trigger API
The Outbound Call Trigger API is designed for IVR projects to initiate calls to customers.
Endpoint:
URL: https://{{baseUrl}}:22222/v2/call
HTTP Method: POST
Content Type: application/json
Here's an example of a request:
curl --location 'https://{{baseUrl}}:22222/v2/call' \
--header 'Content-Type: application/json' \
--header 'Project;' \
--data-raw '{
"Project": "{{project_name}}",
"ConversationId": "{{conversation_Id}}",
"AccessToken": "{{token}}",
"ScenarioPath": "{{scenario_path}}",
"OrchestratorUrl": "{{orchestrator_url}}",
"Tenant": "Default",
"EndUser": {
"Name": "John Doe",
"Phone": "5xxxxxxxxx",
"Email": "johndoe@xxx.com"
},
"Locale": "{{locale}}",
"ScenarioInputParameters": [
{
"Name": "_DisplayNumber",
"Value": "200"
},
{
"Name": "_Destination",
"Value": "{{DestinationNumber}}"
},
{
"Name": "{{variable1}}",
"Value": "{{value1}}"
},
{
"Name": "{{variable2}}",
"Value": "{{value2}"
}
],
"ResultDestination": "{{result_destination_address}}",
"SendResultImmediately": false
}'
Expected Response:
The server responds with HTTP 200 and provides the UniqueId of the outbound call.
{
"UniqueId": "{{unique_id}}"
}
The following parameters can be provided in the request body:
| Parameter | Description | Required |
|---|---|---|
| Project | Name of the project | Yes |
| Tenant | Name of the tenant | Yes |
| ConversationId | Conversation ID | Yes |
| AccessToken | Access token for the VA project | Yes |
| ScenarioPath | Address of the IVR scenario | Yes |
| OrchestratorUrl | Address of the Orchestrator | Yes |
| EndUser | End user information | No |
| Locale | Locale of the conversation | No |
| ScenarioInputParameters | Display Number and Destination are required. Variables defined in the project are optional. | Yes |
| ResultDestination | Address where UniqueId will be sent | No |
| SendResultImmediately | If set to true, the result will be sent as soon as the scenario completes, instead of being queued for later processing. | No |
Get Call Results
Endpoint:
URL: https://{{baseUrl}}:22222/v2/callresult
HTTP Method: POST
Content Type: application/json
Here's an example of a request:
curl --location 'https://{{baseUrl}}:22222/v2/callresult' \
--header 'Content-Type: application/json' \
--data '{
"UniqueIds": [
"{{Unique_Id}}"
]
}'
Expected Response:
The server responds with HTTP 200 and provides the UniqueId of the outbound call.
{
"CallResults": [
{
"UniqueId": "{{unique_Id}}",
"CallRequestId": "",
"CallState": "{{call_state}}"
}
]
}
Possible Call States:
| Call State | Description |
|---|---|
| Answered | The call was successfully connected, and the recipient answered. |
| Busy | The recipient's line is currently engaged, and the call could not be connected. |
| Error | An error occurred while trying to connect the call, such as a network issue. |
| Invalid Number | The number dialed is not valid or cannot be recognized. |
| No Answer | The recipient did not answer the call after a certain number of rings. |
| Rejected | The recipient explicitly rejected the call. |
| Temporarily Unavailable | The recipient's phone is not reachable at the moment due to network issues or being out of coverage. |
