ICTBroadcast uses REST based API to ensure communication and automation between our products and third party applications is a seamless and simple process. Customers can make the most of third party applications without compromising the quality of service ICTBroadcast provides.
Thank you for purchasing ICTBroadcast. If you have any questions that are beyond the scope of this help file, please feel free to email via contact form here. Thanks so much!
REST API provides external interface to call some important functions of ICTBroadcast. Let’s say that we are building an application that we want to automatically upload a recording file and then create a campaign to broadcast to a contact group using ICTBroadcast APIs.
Every REST API call requires authentication before calling the web service method. Following function is used by clients to authenticate requests to the REST API. It will also prepare the request and carry the request to REST Web Service. It has two arguments. First argument is the name of the API method, where as second argument takes an array containing the input data to the method. In next section, concrete examples are given to demonstrate how to prepare arguments and then call this function.
Note: for security using SSL is recomemded while using APIs.
This example creates voice recording, then creates a contact group and adds contacts in the contact group. Then finally we'll create and run campaign.
1. First, we will need to upload the recording file.
2. Next, we will need to create a contact group.
3. Next, we will need to add contact to above contact group.
4. Finally, we will create a campaign that will broadcast our recording file (created in step 1) to contacts (created in step 2 &3).
Following are REST API methods, arguments required by these methods and how to call these methods from client script. For all these methods, authentication and request preparation will be performed by broadcast_api() function that is defined at the start of this document. This should be available while calling any of the following methods.
This function update user password in ICTBroadcast.
newpass: optional, new password for the user.
pincode: optional, new pin code for the user.
Returns json encoded string containing true and success message if successful. In case of failure, it will return false with a failure message.
login_user: optional, usernmae of account, session need for.
Returns json encoded string containing true and Session ID if successful. In case of failure, it will return false with a failure message.
This function delete a session from ICTBroadcast, can be used to log off an active user.
session_id: Session id of active user.
Following are a set of REST APIs that are campaign specific. These APIs allows to create campaign, get campaign status, start campaign, stop campaign, campaign summary etc.
This function returns the status (e.g. running, scheduled, completed etc) of the campaign whose ID is given.
Returns json encoded string containing campaign status data if successful. In case of any failure, it will return false.
This function starts a campaign whose ID is given.
Returns json encoded string containing true and message string if successful. In case of any failure, it will return false and failure message.
This function creates schedule of a campaign whose ID is given. Campaign should be in pending state for successful creation of schedules.
This function stops a campaign whose ID is given.
Returns json encoded string containing true and string message if successful. In case of any failure, it will return false and failure message.
This function stops and deletes/removes a campaign whose ID is given.
campaign_id: ID of the campaign that is to be stopped and removed.
This function adds a given contact that will be dialed by the campaign whose ID is given.
contact: An array containing the contact data. For example, first_name, last_name, phone, email, address, description etc.
This function returns the summary of the campaign. It will list status (busy, congestion, no-response, failed) of each contact in the campaign.
Returns json encoded string containing campaign summary data if successful. In case of any failure, it will return false.
This is similar to Campaign_Summary but it return summary of all matching campaigns.
Returns json encoded string containing list of campaigns. arrange by user and campaign id like [usr_id][campaign_id][status].
This function returns detail results of a campaign. Campaign summary have same set of returned data fields for all types of campaign. But this function returns all the contacts that are dialed and returns the response of that contact.
usr_id: ID of the user who owns this campaign. If not provided, then API authentication credentials will be used to get user id.
Returns json encoded string containing campaign result data if successful. In case of any failure, it will return false.
This function will return contacts that are dialed by campaign where AMD is detected or where DNC option is selected by the call recipient.
This function creates a message (voice) campaign. It requires a recording message and a contact group to run campaign.
campaign: An array of campaign containing IDs of the message (recording_id in this case) and contact_group_id as mandatory fields. campaign array can contain following optional fields: name, contact_repeat, campaign_mode, am_action, am_message etc.
Returns json encoded string containing campaign_id if successful. In case of any failure, it will return false.
This function creates an IVR campaign. It requires an IVR and a contact group. IVR should already be created from IVR Designer and its ID be provided to this API.
campaign: An array of campaign containing IDs of the message (ivr_id in this case) and contact_group_id as mandatory fields. campaign array can contain following optional fields: name, contact_repeat, campaign_mode, am_action, am_message etc.
This function creates an appointment reminder campaign. It requires a reminder message (IVR message) and a contact group. Reminder Message should already be created from Message Designer.
campaign: An array of campaign containing IDs of the message (ivrmessage_id in this case) and contact_group_id as mandatory fields. campaign array can contain following optional fields: name, contact_repeat, campaign_mode, am_action, am_message etc.
This function creates an interactive campaign. It requires a recording message and a contact group to run campaign.
This function creates a fax campaign. It requires a document message and a contact group to run campaign.
campaign: An array of campaign containing IDs of the message (document_id in this case) and contact_group_id as mandatory fields. campaign array can contain following optional fields: name, contact_repeat, campaign_mode, am_action, am_message etc.
This function creates a SMS campaign. It requires a text message and a contact group to run campaign.
campaign: An array of campaign containing IDs of the message (text_id in this case) and contact_group_id as mandatory fields. campaign array can contain following optional fields: name, contact_repeat, campaign_mode, am_action, am_message etc.
This function creates a Email campaign. It requires a email template message and a contact group to run campaign.
campaign: An array of campaign containing IDs of the message (template_id in this case) and contact_group_id as mandatory fields. campaign array can contain following optional fields: name, contact_repeat, campaign_mode, am_action, am_message etc.
Following are a set of REST APIs that are contact specific. These APIs allows to create contact, delete contact, create contact group, and show contact group list.
This function creates a new contact in a group whose contact_group_id is provided while calling this method.
Returns json encoded string containing contact_id if successful. In case of any failure, it will return false.
This function import contact from csv file (or from existing contact group) into given contact group.
contact_group_id: ID of the contact group where we want to save new contacts.
source_file: Path to the contact file (.csv file) preceeded by a @ sign.
source_contact_group_id: Id of existing contact group from where we have to import contacts.
Returns json encoded string containing true and contact count if successful. In case of any failure, it will return false.
This function removes a contact from all contact groups.
Returns json encoded string containing true if successful. In case of any failure, it will return false.
This function lists all the contacts as per given search pattern.
search: An array containing search fields and values.
Returns json encoded string containing true and list of contacts if successful. In case of any failure, it will return false.
This function creates a new contact groups.
contact_group: An array containing the contact group data. For example, name and description.
Returns json encoded string containing true and contact_group_id if successful. In case of any failure, it will return false.
Returns array containing result as boolean and string members.
This function lists all the contact groups of a user.
usr_id: Optional. If not provided then usr_id provided in the authentication will be used.
Returns json encoded string containing true and list of group name and id if successful. In case of any failure, it will return false.
This function removes (a single or multiple) DNC contacts from users DNC list.
Returns json encoded string containing true and success message if successful. In case of any failure, it will return false.
This function lists all the DNC contacts as per given search pattern.
This function creates a new contact in DNC / Don't call list.
contact: An array containing the dnc contact data. For example, first_name, last_name, phone, email, address, description etc.
Returns json encoded string containing contact_dnc_id if successful. In case of any failure, it will return false.
This function import contact into DNC list from csv file (or from existing contact group).
Following are a set of REST APIs that are recording specific. These APIs allows to create recording, show list of available recording.
This function creates a new recording.
title: Name of the recording containing just alphanumeric characters. No special characters allowed.
media: Path to the recording file (.wav file) preceeded by a @ sign.
Returns json encoded string containing true and recording_id if successful. In case of any failure, it will return false.
This function lists all the recording of a user.
Returns json encoded string containing true and list of recording name and id if successful. In case of any failure, it will return false.
Following are a set of REST APIs that are text specific. These APIs allows to create text for sms messages, show list of available text messages.
This function creates a new text message.
name: Name of the text containing just alphanumeric characters. No special characters allowed.
description: some other info about message.
data: Actual text / message body.
Returns json encoded string containing true and text_id if successful. In case of any failure, it will return false.
This function lists all text messages saved by current user.
Returns json encoded string containing true and list of text name and id if successful. In case of any failure, it will return false.
Following are a set of REST APIs that are Email template specific. These APIs allows to create email templates, show list of available template.
This function creates a new template.
name: Name of the template containing just alphanumeric characters. No special characters allowed.
description: some other info about email message.
subject: subject line of email.
body: email message body, possibly HTML .
body_alt: Optional: in case html in body, provide a none html version of message here.
Returns json encoded string containing true and template_id if successful. In case of any failure, it will return false.
This function attach given file with existing template.
name: File Name of the attachment, full name with extention, but without any path reference.
attachment: Path to the attachment file preceded by a @ sign.
Returns json encoded string containing true and template_attachment_id if successful. In case of any failure, it will return false.
This function lists all the template of a user.
Returns json encoded string containing true and list of template name and id if successful. In case of any failure, it will return false.
This function creates a new user in ICTBroadcast.
user: An array containing the user data. For example, username, first_name, last_name, phone, email, address etc.
Returns json encoded string containing usr_id and username if successful. In case of any failure, it will return false with a failure message.
usr_id: A usr_id of the user whose information is to be updated.
This function update password and pincode in ICTBroadcast for given user.
This function list all the users in ICTBroadcast.
This function searches user from ICTBroadcast users.
search: Search parameter on which you want to search e.g. username, first_name, last_name, email, phone, address or usr_id etc.
value: Search value that correspond to the parameter that you specified in 'search parameter'.
This function removes a user from ICTBroadcast.
This function logs-in a user through REST API. This is useful for single sign-on feature.
Returns json encoded string containing true and session_id if successful. In case of any failure, it will return false with a failure message.
This function logs-out a user through REST API. Calling this function will destroy users session on the server.
Returns json encoded string containing true if successful. In case of any failure, it will return false with a failure message.
This function creates an extension and assigns it to the user whose Id is provided in function call.
extension: An array containing the extension data. For example, name, secret, dialstring etc.
Returns json encoded string containing extension_id and secret if successful. In case of any failure, it will return false with a failure message.
This function list all the roles defined in ICTBroadcast.
Returns json encoded string containing true if successful and an array of roles. In case of any failure, it will return false.
This function returns credit of ICTBroadcast user whose ID is provided.
usr_id: ID of the user whose credit is required.
This function creates a payment from a user whose id is provided. This payment amount will credited into that user's account.
type: Payment type. One of the following 4 values. cash, cheque, online, other.
description: Any textual description associated with this payment.
Returns json encoded string containing true and success message if successful. In case of any failure, it will return false with a failure message.
This function list of all the payments made by a user.
usr_id: Optional. id of the user.
Returns json encoded string containing true and list of payments if successful. In case of any failure, it will return false.
This function assigns a permission to the user whose ID is provided.
This function remove a permission of the user whose ID is provided.
This function assigns a resource to the user whose ID is provided.
This function remove a resource of the user whose ID is provided.
Following are a set of REST APIs that are DID management specific. These APIs allows to create did, delete did, update dids.
This function creates a new DID.
did: An array containing the did data. For example, name (DID number), description etc.
Returns json encoded string containing did_id if successful. In case of any failure, it will return false.
This function lists all the dids as per given search pattern.
Returns json encoded string containing true and list of dids if successful. In case of any failure, it will return false.
Following are a set of REST APIs that are AccessNumber management specific. These APIs allows to create accessnumber, delete accessnumber, update accessnumbers.
This function creates a new AccessNumber.
accessnumber: An array containing the accessnumber data. For example, name (AccessNumber number), description etc.
Returns json encoded string containing accessnumber_id if successful. In case of any failure, it will return false.
This function lists all the accessnumbers as per given search pattern.
Returns json encoded string containing true and list of accessnumbers if successful. In case of any failure, it will return false.
REST-based API to integrate ICTBroadcast with third party application"