Karix Bulk Voice Broadcast API Guide
Karix Bulk Voice Broadcast API Guide
Example.................................................................................................................................................. 8
Scenario .............................................................................................................................................. 8
WORKFLOW ........................................................................................................... 11
API GUIDE
The document explains the steps required to make bulk voice calls through HTTP API. In order
to make a successful voice call the user has to go through a two-step process. First step would
be to make a URL request to a template API along with required wav files to set the campaign in
a ready state and the next step would be to invoke the Broadcast API along with the recipient file
to execute the campaign.
Template API
http://IP/voiceapi/tapi.php?account=<account>&pin=<pin>&templateid=<templateid>&retry=<ret
ry>
Based on the template, one or more additional wav files has to be uploaded along with the above
parameters as multipart-form data via HTTP POST.
Required Parameters
Parameter Description
Account* Represents the account name, which will be provided by Karix
Pin* Represents the password, which will be provided by Karix
Templateid* Unique number which represents the actual call flow
Template Description
API supports 6 pre-defined templates, additional template can be supported based on customized
requirement. Below are the template details:
Note: For any additional requirement customer needs to requests Karix team in advance.
Response
{
"status": "failure"
"code": <one of the possible values as shown below>
"desc": "< brief description of the error >"
"ts": "yyyy-mm-dd HH24:mi:ss"
"templateid": <id from the request param>"
}
Parameter Description
campaignid System generated unique id for the request. This will be used in the
broadcast API to send voice calls.
Broadcast API
Request Base URL
http://IP/voiceapi/bapi.php?account=acc&pin=123&campaignid=
Apart from the above parameters the system expects a file to be uploaded as multipart-form data
via HTTP POST. The file being uploaded should hold the recipients number. There is no filename
convention. Only .txt file is supported as of now.
The uploaded file should contain only the recipient number. Each number should be on its own
line. The recipient number can be represented as +14158675309 or 14158675309
Required Parameters
Parameter Description
account Represents the account name, which will be provided by Karix
pin Represents the password, which will be provided by Karix
campaignid Represents the response param "campaignid" from Template API
Response
{
"campaignid": <id obtained from Template API>
"code": 100
"ts": "yyyy-mm-dd HH24:mi:ss"
"status": "success"
}
{
"status": "failure"
"code": <one of the possible values as shown below>
"desc": "< brief description of the error >"
"ts": "yyyy-mm-dd HH24:mi:ss"
"campaignid": <id from the request param>"
}
Parameter Description
campaignid Represents the ID obtained through Template API.
code Represents the status code for the request.
100 (Success)
101 (Invalid Parameters)
102 (Authentication Failed)
Example
Let us assume the customer has been provided with templateid 3 and 6 respectively. These
templateid refers to a pre-defined call flow.
Scenario
Template to be used is 3, which is configured to accept only one clip. The idea of this template is
to play the clip when the user answers the call.
First step is to configure a campaign with this templateid by requesting the Template API
http://IP/voiceapi/tapi.php?account=acc&pin=123&templateid=3
Along with the necessary file upload, in this case the file abc.mp3. Please note the filename POST
parameter should be VC1.
For example the following php code could generate the request successfully:
{
"campaignid": 1100
"code": 100
"ts": "2014-03-27 16:40:10"
"status": "success"
"templateid": 3
}
The next step would be to make the calls by requesting the Broadcast API
http://IP/voiceapi/bapi.php?account=acc&pin=123&campaignid=1100
along with the recipient list file. Please note that the campaignid used is the value you got from
Template API. If you have configured multiple campaigns out of the same templateid please make
sure you use the appropriate campaignid.
For example the following php code could generate the request successfully:
The targeted recipients would receive voice calls on successful API call.
CALLBACK API
In order to provide each and every call details to 3rd party system, CallBack API can be integrated
with Karix system. CallBack API will be called after every number is processed from Karix voice
system.
API:
https://local.xyz.com/voice_Karix/
Parameters:
camp_id: Call was related to which campaign
destination: Number which was called
pickup_time: Call pick up time
hangup_time: Call hang up time
reason: Call dial status
duration: Call duration
WORKFLOW