Operations over voice campaigns

As the campaign creator, you have total control of its execution through operations like start, stop or cancel. All this is possible submitting PUT requests to the following URLs:

Start campaign

Note: if the campaign with the detailed unique id doesn’t exists, a error with the code VOICE-ERR-43 will arrive, indicating that the campaign must have “FAILED” or “PAUSED” status to execute the start operation.

Stop campaign


Cancel campaign


Use example (using start operation, for the others is the same):

Get campaign information

Where the uniqueCampaignId path parameter is the returned string when the campaign was created. This parameter can be used to get information about the campaign through the Campaign Info service; you can call it through the following GET service:

Request example:

The parameters start and limit are used as paging parameters. i.e.

Start: 0 and Limit: 500 It will return the first 500 rows.

Start: 500 and Limit: 500 It will return rows from 500 to 1000.

Start: 1000 and Limit: 500 It will return rows from 1000 to 1500.

By default, start will be 0 and limit will be 500. The Campaign Info service returns a JSON with the following structure:

You can found the detailed structure of the JSON in the following table:

Structure of the JSON
code
String

Code that identifies the error in the Voice Api Error Table.

description
String

Brief description of the error.

success
Boolean

Indicates if the service response is successful or not.

campaignName
String

Name assigned to the campaign.

campaignCost
Double

Calculated cost of the campaign.

campaignConfig
Object

All the configuration info of the campaign, like call and time parametrization.

List of objects
String

Details of each call in the campaign.

Voice campaign configuration object structure

Voice campaign configuration object structure
callerId
String

The number that appears as the caller in the mobile destinations.

minTime
String

Low time limit where the campaign launches calls to the destinations, in 24 hours format e.g. 08:00.

maxTime
String

Max time limit where the campaign launches calls to the destinations, in 24 hours format e.g. 22:00.

dialCounts
Integer

NRetries to a call destination, where it fails.

timeBetweenDials
Integer

Time in minutes where each retry for a specific call destination is executed.

nextDayContinue
Boolean

Define if the campaign continue with its execution in the next day, or it must finalize and omit all the remaining calls.

voice
Boolean

All the audios in the campaign will be played with the selected voice. In some cases (e.g. the API created campaigns) this voice is setted as UNKNOWN.

personalizedText
String

Set a text and the campaign will only plays its content.

capacity
String

Max concurrent calls in execution for the campaign.

Call Detail object structure

Request Parameters
mobileNumber
String

Mobile destination of the call.

name
String

First name of the destination person.

lastName
String

Last name of the destination person.

duration
Integer

Duration of the call. It could be zero if the call hasn’t be executed.

status
Integer

Status of the call, it consider the following values:

  • PROGRAMMED
  • IN_PROGRESS
  • NO_ANSWER
  • FINISHED
  • SUCCESS_FINISHED
  • NO_ENOUGH_BALANCE
  • CALL_FAILED
  • NO_RATES_FOUND