Outbound call and campaign management API

This API allows you to manage the calls to be made, either through individual outbound calls or in the form of an outbound call campaign.

The API allows you to:

  1. Request a new outbound call
  2. View the status of an outbound call
  3. View the status of an outbound call

1 General considerations

The API uses the REST paradigm, accepting data as parameters by way of GET or POST operations, and returning data in JSON format.

1.1 Parameters

All the API functions require the use of the following parameters (in addition to specific parameters):

NameTypeDefaultMand.Description
auth_idAlphanum 32YAPI user ID
auth_passwordAlphanum 32YPassword

1.2 Response

If successful, the API will respond with 200 OK as well as the specific fields for the function called. In case of an error, an appropriate HTTP return code will be used and the JSON message will contain the following fields:

NameTypeDescription
statusNumHTTP return code
err_codeAlphanum 16OK if successful, or a specific error code, for example INVALID_AUTH
err_msgAlphanumError message (human readable)

2 Campaign management

The use of campaigns is optional, allowing you to view and track a set of calls to be made. The API offers the following functions:

  1. Create a new campaign
  2. Edit a campaign
  3. View the status of a campaign (statistics)

2.1 Create a new campaign

URL/vm/campaign
Méthode(s)POST

Parameters

NameTypeDefaultMand.Description
nameAlphanum 32 YName of the campaign to be created
recordBool0NEnable recording of all calls for this campaign. NB: even if this value is 0, recording can be active for other reasons (for example, if it is configured for a specific agent)

Response

NameTypeDescription
id_campaignNumNew campaign ID, to be use for other API calls

2.2 Edit a campaign

URL/vm/campaign/<id_campaign>
Méthode(s)POST

Parameters

NameTypeDefaultMand.Description
nameAlphanum 32 NNew campaign name
recordBool0NEnable recording of all calls for this campaign. NB: even if this value is 0, recording can be active for other reasons (for example, if it is configured for a specific agent)
pauseBool NPause/resume the campaign (unchanged if parameter is absent)

Response

NameTypeDescription
id_campaignNumCampaign ID
nameAlphanum 32Campaign name
pauseBoolCampaign pause notification
recordBoolRecording enabled notification

2.3 Cancel a campaign

URL/vm/campaign/<id_campaign>/cancel
Méthode(s)POST

Parameters

None

Response

NameTypeDescription
id_campaignNumCampaign ID
nameAlphanum 32Campaign name
pauseBoolCampaign pause notification
recordBoolRecording enabled notification

2.4 View the status of a campaign

URL/vm/campaign/<id_campaign>
Method(s)GET

Parameters

None

Response

NameTypeDescription
id_campaignNumCampaign ID
nameAlphanum 32Campaign name
pauseBoolCampaign pause notification
recordBoolRecording enabled notification
total_calls_countNum 8Total number of calls to be made
ok_status_countNum 8Number of successful calls
ko_status_countNum 8Number of failed calls
pending_status_countNum 8Number of calls still to be made

3 Outbound call management

3.1 Request a new outbound call

URL/vm/outbound_call
Method(s)POST

Query format

Queries must be formatted as follows:

curl -u <username>:<password> "https://api.axialys.com/vm/outbound_call" -X POST -d '{"dest_number":<numéro>,"id_agent":<id_agent>}'

Parameters

NameTypeDefaultMand.Description
id_campaignNumNCampaign ID to which the call belongs
typeAUTO/MANUALMANUALNType of outbound call. AUTO: the call is automatically launched when an agent is free, MANUAL: the agent must approve the call launch
dest_numberAlphanum 1024 YOne or more destination numbers depending on whether it is a campaign or a single outbound call (in the E.164 format without +, separated by commas). E.g.: 33170200200,33634123452
priorityNum 3NNCall priority; default: 10; if the value is lower, then this call will take priority; if it is higher, it will not take priority
variablesAlphanum 255 NSpecific call variables, shown in the popup and that can be used for statistical monitoring. JSON format. E.g.: {“nom_valeur1”: “value1”, “nom_valeur2”: “value2”}
ring_timeoutNum 430NMax ring time, in seconds
retriesNum 43NMaximum number of callback attempts in case of failure
retry_timeoutNum 4300N(Minimum) time between each new attempt, in seconds
auto_timeoutNum 40N(Minimum) time before automatic call initiation, in seconds
unassign_timeoutNum 460NMaximum time the operator has to make the call before it is assigned to another operator, in seconds
start_from_dateDate/TimeNowNStart date to make one or more calls, in the ISO 8601 format. E.g.: 2016-11-05T09:00
end_before_dateDate/TimeNoneNEnd date to make one or more calls, in the ISO 8601 format
start_from_hourTime NStart time (daily) to make one or more calls, in the ISO 8601 format or HH:MM:SS
end_before_hourTime NEnd time (daily) to make one or more calls, in the ISO 8601 format or HH:MM:SS
id_agentNum 10 NThe agent who has to make the call (mandatory if a group is not chosen)
id_groupNum 10 NThe group of agents who have to make the call (mandatory if an operator is not chosen)
It is possible to assign outbound calls to a specific agent from a group if “agent_id” and “group_id” are provided in the same query.

Response

NameTypeDescription
id_out_callNumOne or more destination number IDs depending on whether it is a campaign or a single outbound call, separated by commas

3.2 View the status of an outbound call

URL/vm/outbound_call/<id_out_call>
Method(s)GET

Parameters

None

Response

The same fields as when you created the call are returned, plus:

NameTypeDescription
date_submittedDate/TimeCreation date, in the ISO 8601 format
alloc_to_id_agentNumID of the agent who made the call
statusPENDING/ASSIGNED/DIALING/CONNECTED/SUCCESS/FAILURECall status
call_dateDate/TimeDate of the call (or of the last attempt), in the ISO 8601 format
answered_durationNumCall duration (in seconds)
failure_reasonAlphanum 16Reason for failure

3.3 Supprimer un ou des appels sortants

URL/vm/outbound_call
Method(s)DELETE
Only requests in the PENDING state are impacted by this method

Request format

Requests must be made in the form

curl -u <username>:<password> "https://api.axialys.com/vm/outbound_call" -X DELETE -d '{"dest_number":<numéro>,"id_agent":<id_agent>}'

Settings

NameTypeDefaultOblig.Description
id_campaignNumNID for the campaign which the call is part of
typeAUTO/MANUALMANUALNType for making the outgoing call. AUTO: the call is automatically triggered as soon as an agent is free, MANUAL the agent must trigger the call
id_agentNum 10 Y/NThe agent who should make the call (obligatory if a group is not chosen ))
id_groupNum 10 Y/NThe group of agents who should make the call ( obligatory if an operator is not chosen)
dest_numberAlphanum 1024 YOne or more recipient numbers depending on whether it is a campaign or a unitary outgoing call (in E.164 format without +, separated by commas). Ex: 33170200200,336XXXXXXX
priorityNum 3NNCall priority; 10 by default; if the value is lower, then this call will have priority; if it is greater, it will be non-priority
variablesAlphanum 255 NVariables specific to the call, shown in the popup and usable for statistics monitoring. JSON structure type format. Ex: {“name_value1”:“value1”,“name_value2”:“value2”}
ring_timeoutNum 430NMaximum ringing time, in seconds
retriesNum 43NMaximum number of recall attempts if unsuccessful
retry_timeoutNum 4300NTime (minimum) between each new attempt, in seconds
auto_timeoutNum 460NTime (minimum) before the automatic call is triggered, in seconds
unassign_timeoutNum 460NMaximum time the operator has to make the call before allocation to another operator, in seconds
start_from_dateDate/hourNowNStart date for making one or more calls, in ISO8601 form. Ex: 2016-11-05T09:00
end_before_dateDate/hourNoneNEnd date for making one or more calls, in ISO8601 form
start_from_hourHour NStart time (daily) to make one or more calls, in ISO8601 or HH:MM:SS form
end_before_hourHour NEnd time (daily) to make one or more calls, in ISO8601 or HH:MM:SS form

Return

Number of calls impacted.

3.4 Modifier un ou des appels sortants

URL/vm/outbound_call
Méthode(s)PUT
Only requests in the PENDING state are impacted by this method

Request format

Requests must be made in the form

curl -u <username>:<password> "https://api.axialys.com/vm/outbound_call" -X PUT -d '{"dest_number":<numéro>,"id_agent":<id_agent>}'

Settings

NameTypeDefaultOblig.Description
id_campaignNumNID for the campaign which the call is part of
typeAUTO/MANUALMANUALNType for making the outgoing call. AUTO: the call is automatically triggered as soon as an agent is free, MANUAL the agent must confirm that the call should start
id_agentNum 10 Y/NThe agent who has to make the call (obligatory if a group is not chosen)
id_groupNum 10 Y/NThe group of agents who will have to make the call (obligatory if an operator is not chosen)
dest_numberAlphanum 1024 YOne or more recipient numbers depending on whether it is a campaign or a unitary outgoing call (in E.164 format without +, separated by commas). Ex: 33170200200,336XXXXXXX
priorityNum 3NNCall priority; 10 by default; if the value is lower, then this call will have priority; if it is greater, it will be non-priority
variablesAlphanum 255 NVariables specific to the call, shown in the popup and usable for statistics monitoring. JSON structure type format. Ex: {“name_value1”:“value1”,“name_value2”:“value2”}
ring_timeoutNum 430NMaximum ringing time, in seconds
retriesNum 43NMaximum number of recall attempts if unsucessful
retry_timeoutNum 4300NTime (minimum) between each new attempt, in seconds
auto_timeoutNum 40NTime (minimum) before the automatic call is triggered, in seconds
unassign_timeoutNum 460NMaximum time the operator has to make the call before allocation to another operator, in seconds
start_from_dateDate/HeureMaintenantNStart date for making one or more calls, in ISO8601 form. Ex: 2016-11-05T09:00
end_before_dateDate/HeureAucunNEnd date for making one or more calls, in ISO8601 form
start_from_hourHeure NStart time (daily) to make one or more calls, in ISO8601 or HH:MM:SS form
end_before_hourHeure NEnd time (daily) to make one or more calls, in ISO8601 or HH:MM:SS form
Id_msg_opNum NIID of the audio message to be played to the operator

Return

Number of calls impacted.