Innocalls
Call CampaignSingle Call

Initialize Single Call

Initiate a single outbound call with custom options

Init Single Call

Details

DescriptionThe "Init" endpoint initializes a single call.
HTTP Method POST
Endpoint URL

https://platform.innocalls.com/v1/api-gateway/call-campaign/:id/single-call/init

Authorization

To access the API endpoints, you need to authenticate using API keys and API secrets. The API supports Basic Authentication for authorization. You need to include your API ID as the username and your API secret as the password in the HTTP header when making requests. Replace API_ID with your API ID and API_SECRET with your API secret, separated by a colon (:). The value after Basic is the Base64 encoding of your API key and API secret concatenated with a colon.

Rate Limit 3 requests per second

Request Parameters

ParameterDescription Format LocationConstrains
id

The ID of the call campaign that the call belongs to

String PathRequired
phone The phone number to be used in the process. National formatBodyRequired
useDefaultFlowOptions

Determines whether to use default flow options or custom options

Boolean (true/false)BodyRequired
minutesToWaitBeforeFirstTrial

The number of minutes to wait before the first trial

IntegerBody

Required if useDefaultFlowOptions false


Min: 0
delayMinutesBetweenTrials The delay in minutes between each trial. IntegerBody

Required if useDefaultFlowOptions false


Min: 5
trialsCount The number of trials to be conducted. IntegerBody

Required if useDefaultFlowOptions false


Min: 1
Max: 10
variables

An array of call campaign variables with their values.

Array of objectsBody

Required if the flow has variables

Request Example

Example 1


curl 'https://platform.innocalls.com/api/v1/api-gateway/call-campaign/:id/single-call/init' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <base64-encoded string  apiId:apiSecret>' \
--data '{
  "phone": "2012xxxxxxxx",
  "useDefaultFlowOptions": true
}'
Description

When the call campaign does not have any required variables and you want to use the same call campaign flow options.

Example 2


curl 'https://platform.innocalls.com/api/v1/api-gateway/call-campaign/:id/single-call/init' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <base64-encoded string  apiId:apiSecret>' \
--data '{
 "phone": "2012xxxxxxxx",
 "trialsCount": 2,
 "minutesToWaitBeforeFirstTrial": 1,
 "delayMinutesBetweenTrials": 5,
 "useDefaultFlowOptions": false
}'
Description

When the call campaign doesn't have any required variables, and you want to customize options for trialsCount, minutesToWaitBeforeFirstTrial, and delayMinutesBetweenTrials, instead of using the same call campaign flow options.

Example 3


curl 'https://platform.innocalls.com/api/v1/api-gateway/call-campaign/:id/single-call/init' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <base64-encoded string  apiId:apiSecret>' \
--data '{
 "phone": "2012xxxxxxxx",
 "useDefaultFlowOptions": true,
  "variables": [
      {
          "variableName": "moneyVar",
          "value": {
              "amount": "1050",
              "currency": "USD"
          }
      },
      {
          "variableName": "fullNumberVar",
          "value": "12"
      },
      {
          "variableName": "separatedNumberVar",
          "value": "002"
      },
      {
          "variableName": "txtVar",
          "value": "hi"
      }
  ]
}'
Description

When the call campaign includes required variables, the variables field should be an array containing all necessary variables along with their corresponding values. The value for each variable must adhere to specific constraints based on the variable type selected during creation.

  • For text variables, the value should not be empty.
  • For separated variables, the value should consist only of numeric digits.
  • For money variables, the value should be an object containing the amount and the currency.
    The amount should be a number greater than zero, and the currency should be one of the allowed currencies: 'SAR', 'USD', 'EGP', 'EUR'.
  • For fullNumber variables, the value should be a valid integer number.

Success Response Example

A successful response is indicated by the HTTP status code 204.

Possible Errors

Error CodeDescription
401 UnauthorizedInvalid Credential
403 ForbiddenNot Enough Permissions to access the resource
429 Too Many RequestsThis occurs when requests exceed the rate limit
404 Not Found

This occurs when the requested call campaign is not found

400 BadRequest

This error occurs due to malformed or invalid request parameters

On this page