Alerts Application Programming Interface (API)

Alerts API provides a powerful and flexible way to manage your Alert Group Members and Messages. Developers can use the API to use Instant Notification system from outside the members area. You can add New Alert Group Members as well as Expire / Delete / Renew them. You can also send all types of Alert Messages using this API. You can get Campaigns and Template data by using simple methods of the API.

Latest API Version: 5.06

API Endpoint: http://www.alertsdesktop.com/api_service_506v.php


Essential Variables

  1. USER : Your API Username (available from Account Settings page)
  2. PASS : Your API Password (available from Account Settings page)
  3. SIGN : Your API Signature (available from Account Settings page)
  4. METHOD : See the Available Methods section below
  5. VERSION : Must match the API you are calling e.g. 5.06 in this case

 


Available Methods

GET_CAMPAIGNS : This method is used to get all the Alert Groups

 

Required Variables: None

Returns:

  1. Comma separated list of Group ID and Name with both separated by colon.
    e.g. Group #1 Unique ID:Group #1 Name,Group #2 Unique ID:Group #2 Name, Group #3 Unique ID:Group #3 Name ...and so on..

 

GET_ALERTS : This method is used to get all the Alerts posted within a fixed time period.

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. start_time : Starting DateTime (YYYY-MM-DD HH:MM:SS) for Search (required)
  3. end_time : Ending Date Time (YYYY-MM-DD HH:MM:SS) for Search (required)
  4. alert_type : (Active / Expired) (required)

Returns:

  1. {ROW} and {COL} separated list of all type of Alerts who fit in criterion asked..
    e.g. {ROW}{COL}Some1 {COL}Some 2{ROW} ...and so on..

 

GET_TEMPLATES : This method is used to get all the Alert Templates

 

Required Variables: None

Returns:

  1. Comma separated list of Template ID and Title with both separated by colon.
    e.g. Template #1 Unique ID:Template #1 Title,Template #2 Unique ID:Template #2 Title, Template #3 Unique ID:Template #3 Title ...and so on..

 

ALERT_MESSAGE : This method is used to send Desktop Alert Message

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. alert_title : Alert Message Title (required)
  3. alert_message : Alert Message Content (required)
  4. alert_template : Alert Template ID to use for making final alert (required)
  5. alert_link : Alert Message Link (optional)
  6. alert_active : Y / N (required)
  7. alert_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=ALERT_MESSAGE&RESPONSE=Alert Message Posted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=ALERT_MESSAGE&RESPONSE=Error Message with Error Code

 

SMS_MESSAGE : This method is used to send SMS Alert Message

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. sms_title : SMS Message Title (required)
  3. sms_message : SMS Message Content (required) (max 160 characters)
  4. sms_active : Y / N (required)
  5. sms_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=SMS_MESSAGE&RESPONSE=SMS Message Posted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=SMS_MESSAGE&RESPONSE=Error Message with Error Code

 

EMAIL_MESSAGE : This method is used to send Email Alert Message

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. email_title : Email Message Title (required)
  3. email_message : Email Message Content (required)
  4. email_template : Alert Template ID to use for making final email alert (required)
  5. email_active : Y / N (required)
  6. email_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=EMAIL_MESSAGE&RESPONSE=Email Message Posted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=EMAIL_MESSAGE&RESPONSE=Error Message with Error Code

 

FACEBOOK_MESSAGE : This method is used to send Facebook Alert Message

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. alert_title : Alert Message Title (required)
  3. alert_message : Alert Message Content (required)
  4. alert_link : Alert Message Link (optional)
  5. alert_active : Y / N (required)
  6. alert_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=FACEBOOK_MESSAGE&RESPONSE=Facebook Message Posted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=FACEBOOK_MESSAGE&RESPONSE=Error Message with Error Code

 

TWITTER_MESSAGE : This method is used to send Twitter Alert Message

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. alert_title : Alert Message Title (required)
  3. alert_message : Alert Message Content (required)
  4. alert_link : Alert Message Link (optional)
  5. alert_active : Y / N (required)
  6. alert_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=TWITTER_MESSAGE&RESPONSE=Twitter Message Posted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=TWITTER_MESSAGE&RESPONSE=Error Message with Error Code

 

CHECK_ALERT_SUBSCRIPTION : This method is used to add a Check Desktop Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=CHECK_ALERT_SUBSCRIPTION&RESPONSE=subscription_name,subscription_email,subscription_password,subscription_start_date,subscription_expiry_date,subscription_recurring_interval,subscription_multiple_use,subscription_auto_renew
  2. If NOT FOUND, response will be
    RESULT=SUCCESS&REQUEST=CHECK_ALERT_SUBSCRIPTION&RESPONSE=No such subscription (Code.10)
  3. If FAILURE, response will be
    RESULT=ERROR&REQUEST=CHECK_ALERT_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

CHECK_EMAIL_SUBSCRIPTION : This method is used to add a Check Email Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=CHECK_EMAIL_SUBSCRIPTION&RESPONSE=subscription_name,subscription_email,subscription_start_date,subscription_expiry_date,subscription_recurring_interval,subscription_multiple_use,subscription_auto_renew
  2. If NOT FOUND, response will be
    RESULT=SUCCESS&REQUEST=CHECK_EMAIL_SUBSCRIPTION&RESPONSE=No such subscription (Code.10)
  3. If FAILURE, response will be
    RESULT=ERROR&REQUEST=CHECK_EMAIL_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

CHECK_SMS_SUBSCRIPTION : This method is used to add a Check SMS Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_mobile : Group Member Mobile No (required)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=CHECK_SMS_SUBSCRIPTION&RESPONSE=subscription_name,subscription_mobile,subscription_start_date,subscription_expiry_date,subscription_recurring_interval,subscription_multiple_use,subscription_auto_renew
  2. If NOT FOUND, response will be
    RESULT=SUCCESS&REQUEST=CHECK_SMS_SUBSCRIPTION&RESPONSE=No such subscription (Code.10)
  3. If FAILURE, response will be
    RESULT=ERROR&REQUEST=CHECK_SMS_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

GET_ALERT_SUBSCRIPTIONS : This method is used to get all Desktop Alert Group Members

 

Required Variables:

  1. cid : Alert Group Unique ID (required)

Returns:

  1. If FOUND, response will be comma separated alert group member records
    RESULT=SUCCESS&REQUEST=GET_ALERT_SUBSCRIPTIONS&RESPONSE=subscriber_id:subscriber_name:subscriber_email:subscriber_password:subscriber_code:subscriber_autorenew:subscriber_expiry:expiry_days:recurring_interval:multiple_use
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=GET_ALERT_SUBSCRIPTIONS&RESPONSE=Error Message with Error Code

 

GET_EMAIL_SUBSCRIPTIONS : This method is used to get all Email Alert Group Members

 

Required Variables:

  1. cid : Alert Group Unique ID (required)

Returns:

  1. If FOUND, response will be comma separated alert group member records
    RESULT=SUCCESS&REQUEST=GET_EMAIL_SUBSCRIPTIONS&RESPONSE=subscriber_id:subscriber_name:subscriber_email:subscriber_autorenew:subscriber_expiry:expiry_days:recurring_interval:feeds
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=GET_EMAIL_SUBSCRIPTIONS&RESPONSE=Error Message with Error Code

 

GET_SMS_SUBSCRIPTIONS : This method is used to get all SMS Alert Group Members

 

Required Variables:

  1. cid : Alert Group Unique ID (required)

Returns:

  1. If FOUND, response will be comma separated alert group member records
    RESULT=SUCCESS&REQUEST=GET_SMS_SUBSCRIPTIONS&RESPONSE=subscriber_id:subscriber_name:subscriber_mobile:subscriber_autorenew:subscriber_expiry:expiry_days:recurring_interval:feeds
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=GET_SMS_SUBSCRIPTIONS&RESPONSE=Error Message with Error Code

 

NEW_ALERT_SUBSCRIPTION : This method is used to add a New Desktop Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_type : fixed / recurring (required)
  3. subscription_name : Group Member Name (required)
  4. subscription_email : Group Member Email (required)
  5. subscription_password : Group Member Password (required)
  6. subscription_expiry : Group Member Expiry Period (required) (must be numeric)
  7. subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
  8. promo_code : Promotion Code (optional)
  9. subscription_multiple_use : Y / N (required)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=NEW_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Added Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=NEW_ALERT_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

NEW_SMS_SUBSCRIPTION : This method is used to add a New SMS Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_type : fixed / recurring (required)
  3. subscription_name : Group Member Name (required)
  4. subscription_mobile : Group Member Mobile (required)
  5. subscription_expiry : Group Member Expiry Period (required) (must be numeric)
  6. subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
  7. promo_code : Promotion Code (optional)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=NEW_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Added Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=NEW_SMS_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

NEW_EMAIL_SUBSCRIPTION : This method is used to add a New Email Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_type : fixed / recurring (required)
  3. subscription_name : Group Member Name (required)
  4. subscription_email : Group Member Email (required)
  5. subscription_expiry : Group Member Expiry Period (required) (must be numeric)
  6. subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
  7. promo_code : Promotion Code (optional)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=NEW_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Added Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=NEW_EMAIL_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

NEW_UNIQUE_ALERT_SUBSCRIPTION : This method is used to add a New Unique Desktop Alert Group Member (Unique Email Address)

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_type : fixed / recurring (required)
  3. subscription_name : Group Member Name (required)
  4. subscription_email : Group Member Email (required)
  5. subscription_password : Group Member Password (required)
  6. subscription_expiry : Group Member Expiry Period (required) (must be numeric)
  7. subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
  8. promo_code : Promotion Code (optional)
  9. subscription_multiple_use : Y / N (required)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=NEW_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Added Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=NEW_ALERT_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

NEW_UNIQUE_SMS_SUBSCRIPTION : This method is used to add a New Unique SMS Alert Group Member (Unique Cell Number)

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_type : fixed / recurring (required)
  3. subscription_name : Group Member Name (required)
  4. subscription_mobile : Group Member Mobile (required)
  5. subscription_expiry : Group Member Expiry Period (required) (must be numeric)
  6. subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
  7. promo_code : Promotion Code (optional)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=NEW_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Added Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=NEW_SMS_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

NEW_UNIQUE_EMAIL_SUBSCRIPTION : This method is used to add a New Unique Email Alert Group Member (Unique Email Address)

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_type : fixed / recurring (required)
  3. subscription_name : Group Member Name (required)
  4. subscription_email : Group Member Email (required)
  5. subscription_expiry : Group Member Expiry Period (required) (must be numeric)
  6. subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
  7. promo_code : Promotion Code (optional)

Returns:

  1. If FOUND, response will be
    RESULT=SUCCESS&REQUEST=NEW_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Added Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=NEW_EMAIL_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

RENEW_ALERT_SUBSCRIPTION : This method is used to renew subscription of Desktop Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)
  4. subscription_recurring_interval : Subscription Renewal Interval like 5 MINUTE / 1 HOUR / 2 DAY / 1 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=RENEW_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Renewed Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=RENEW_ALERT_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

RENEW_EMAIL_SUBSCRIPTION : This method is used to renew subscription of Email Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)
  4. subscription_recurring_interval : Subscription Renewal Interval like 5 MINUTE / 1 HOUR / 2 DAY / 1 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=RENEW_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Renewed Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=RENEW_EMAIL_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

RENEW_SMS_SUBSCRIPTION : This method is used to renew subscription of SMS Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_mobile : Group Member Mobile No (required)
  4. subscription_recurring_interval : Subscription Renewal Interval like 5 MINUTE / 1 HOUR / 2 DAY / 1 MONTH / 1 YEAR etc. (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=RENEW_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Renewed Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=RENEW_SMS_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

EXPIRE_ALERT_SUBSCRIPTION : This method is used to expire subscription of Desktop Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=EXPIRE_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Expired Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=EXPIRE_ALERT_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

EXPIRE_EMAIL_SUBSCRIPTION : This method is used to expire subscription of Email Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=EXPIRE_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Expired Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=EXPIRE_EMAIL_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

EXPIRE_SMS_SUBSCRIPTION : This method is used to expire subscription of SMS Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_mobile : Group Member Mobile No (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=EXPIRE_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Expired Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=EXPIRE_SMS_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

DELETE_ALERT_SUBSCRIPTION : This method is used to add a Delete Desktop Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=DELETE_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Deleted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=DELETE_ALERT_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

DELETE_EMAIL_SUBSCRIPTION : This method is used to add a Delete Email Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_email : Group Member Email (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=DELETE_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Deleted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=DELETE_EMAIL_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

DELETE_SMS_SUBSCRIPTION : This method is used to add a Delete SMS Alert Group Member

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. subscription_name : Group Member Name (required)
  3. subscription_mobile : Group Member Mobile No (required)

Returns:

  1. If SUCCESS, response will be
    RESULT=SUCCESS&REQUEST=DELETE_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Deleted Successfully
  2. If FAILURE, response will be
    RESULT=ERROR&REQUEST=DELETE_SMS_SUBSCRIPTION&RESPONSE=Error Message with Error Code

 

GET_ALERT_REPLIES : This method is used to get any Replies to Alert within the fixed Time Period.

 

Required Variables:

  1. cid : Alert Group Unique ID (required)
  2. start_time : Start Date Time (YYYY-MM-DD HH:MM:SS) for Search (required)
  3. end_time : End Date Time (YYYY-MM-DD HH:MM:SS) for Search (required)

Returns:

  1. {ROW} and {COL} separated list of all type of Alerts and Replies who fit in criterion asked..
    e.g. alert_title{COL}alert_start_time{COL}subscriber_email{COL}submit_time{COL}rating{COL}reply{ROW} ...and so on..

 

 

 


API Examples

User Registration Example: This example shows the usage of API to register new group members from any website.
Demo    Download PHP Code

 

Alert Message Post Example: This example shows the usage of API to send any type of alerts from any website.
Demo    Download PHP Code #1    Download Auto Register Code #2