Outbound Call Request API
  • 17 Oct 2024
  • 1 Minute to read
  • Contributors
  • PDF

Outbound Call Request API

  • PDF

Article summary

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": ""
    }
  ]
}


Note:

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:

ParameterDescriptionRequired
projectNameName of the projectYes
AuthorizationBearer tokenYes
callRequestIdCall Request IDYes
channelIdChannel ID informationYes
endUserEnd user information. Phone is requiredYes
parametersDisplay Number and project variables are providedNo
localeLocale of the conversationNo



Expected Response:

{
"OutboundRequestId": ""    
}

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.