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
- USER : Your API Username (available from Account Settings page)
- PASS : Your API Password (available from Account Settings page)
- SIGN : Your API Signature (available from Account Settings page)
- METHOD : See the Available Methods section below
- 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:
- 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..
- Comma separated list of Group ID and Name with both separated by colon.
- GET_ALERTS : This method is used to get all the Alerts posted within a fixed time period.
-
Required Variables:
- cid : Alert Group Unique ID (required)
- start_time : Starting DateTime (YYYY-MM-DD HH:MM:SS) for Search (required)
- end_time : Ending Date Time (YYYY-MM-DD HH:MM:SS) for Search (required)
- alert_type : (Active / Expired) (required)
Returns:
- {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:
- 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..
- Comma separated list of Template ID and Title with both separated by colon.
- ALERT_MESSAGE : This method is used to send Desktop Alert Message
-
Required Variables:
- cid : Alert Group Unique ID (required)
- alert_title : Alert Message Title (required)
- alert_message : Alert Message Content (required)
- alert_template : Alert Template ID to use for making final alert (required)
- alert_link : Alert Message Link (optional)
- alert_active : Y / N (required)
- alert_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=ALERT_MESSAGE&RESPONSE=Alert Message Posted Successfully - 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:
- cid : Alert Group Unique ID (required)
- sms_title : SMS Message Title (required)
- sms_message : SMS Message Content (required) (max 160 characters)
- sms_active : Y / N (required)
- sms_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=SMS_MESSAGE&RESPONSE=SMS Message Posted Successfully - 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:
- cid : Alert Group Unique ID (required)
- email_title : Email Message Title (required)
- email_message : Email Message Content (required)
- email_template : Alert Template ID to use for making final email alert (required)
- email_active : Y / N (required)
- email_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=EMAIL_MESSAGE&RESPONSE=Email Message Posted Successfully - 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:
- cid : Alert Group Unique ID (required)
- alert_title : Alert Message Title (required)
- alert_message : Alert Message Content (required)
- alert_link : Alert Message Link (optional)
- alert_active : Y / N (required)
- alert_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=FACEBOOK_MESSAGE&RESPONSE=Facebook Message Posted Successfully - 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:
- cid : Alert Group Unique ID (required)
- alert_title : Alert Message Title (required)
- alert_message : Alert Message Content (required)
- alert_link : Alert Message Link (optional)
- alert_active : Y / N (required)
- alert_expiry : Expiry time from now in format like 5 MINUTE / 1 HOUR / 1 DAY / 2 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=TWITTER_MESSAGE&RESPONSE=Twitter Message Posted Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
Returns:
- 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 - If NOT FOUND, response will be
RESULT=SUCCESS&REQUEST=CHECK_ALERT_SUBSCRIPTION&RESPONSE=No such subscription (Code.10) - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
Returns:
- 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 - If NOT FOUND, response will be
RESULT=SUCCESS&REQUEST=CHECK_EMAIL_SUBSCRIPTION&RESPONSE=No such subscription (Code.10) - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_mobile : Group Member Mobile No (required)
Returns:
- 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 - If NOT FOUND, response will be
RESULT=SUCCESS&REQUEST=CHECK_SMS_SUBSCRIPTION&RESPONSE=No such subscription (Code.10) - 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:
- cid : Alert Group Unique ID (required)
Returns:
- 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 - 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:
- cid : Alert Group Unique ID (required)
Returns:
- 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 - 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:
- cid : Alert Group Unique ID (required)
Returns:
- 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 - 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:
- cid : Alert Group Unique ID (required)
- subscription_type : fixed / recurring (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
- subscription_password : Group Member Password (required)
- subscription_expiry : Group Member Expiry Period (required) (must be numeric)
- subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
- promo_code : Promotion Code (optional)
- subscription_multiple_use : Y / N (required)
Returns:
- If FOUND, response will be
RESULT=SUCCESS&REQUEST=NEW_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Added Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_type : fixed / recurring (required)
- subscription_name : Group Member Name (required)
- subscription_mobile : Group Member Mobile (required)
- subscription_expiry : Group Member Expiry Period (required) (must be numeric)
- subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
- promo_code : Promotion Code (optional)
Returns:
- If FOUND, response will be
RESULT=SUCCESS&REQUEST=NEW_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Added Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_type : fixed / recurring (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
- subscription_expiry : Group Member Expiry Period (required) (must be numeric)
- subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
- promo_code : Promotion Code (optional)
Returns:
- If FOUND, response will be
RESULT=SUCCESS&REQUEST=NEW_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Added Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_type : fixed / recurring (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
- subscription_password : Group Member Password (required)
- subscription_expiry : Group Member Expiry Period (required) (must be numeric)
- subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
- promo_code : Promotion Code (optional)
- subscription_multiple_use : Y / N (required)
Returns:
- If FOUND, response will be
RESULT=SUCCESS&REQUEST=NEW_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Added Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_type : fixed / recurring (required)
- subscription_name : Group Member Name (required)
- subscription_mobile : Group Member Mobile (required)
- subscription_expiry : Group Member Expiry Period (required) (must be numeric)
- subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
- promo_code : Promotion Code (optional)
Returns:
- If FOUND, response will be
RESULT=SUCCESS&REQUEST=NEW_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Added Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_type : fixed / recurring (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
- subscription_expiry : Group Member Expiry Period (required) (must be numeric)
- subscription_expiry_type : Group Member Expiry Period Type e.g. MINUTE / HOUR / DAY / MONTH / YEAR etc. (required)
- promo_code : Promotion Code (optional)
Returns:
- If FOUND, response will be
RESULT=SUCCESS&REQUEST=NEW_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Added Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
- subscription_recurring_interval : Subscription Renewal Interval like 5 MINUTE / 1 HOUR / 2 DAY / 1 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=RENEW_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Renewed Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
- subscription_recurring_interval : Subscription Renewal Interval like 5 MINUTE / 1 HOUR / 2 DAY / 1 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=RENEW_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Renewed Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_mobile : Group Member Mobile No (required)
- subscription_recurring_interval : Subscription Renewal Interval like 5 MINUTE / 1 HOUR / 2 DAY / 1 MONTH / 1 YEAR etc. (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=RENEW_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Renewed Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=EXPIRE_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Expired Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=EXPIRE_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Expired Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_mobile : Group Member Mobile No (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=EXPIRE_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Expired Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=DELETE_ALERT_SUBSCRIPTION&RESPONSE=Alert Subscription Deleted Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_email : Group Member Email (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=DELETE_EMAIL_SUBSCRIPTION&RESPONSE=Email Subscription Deleted Successfully - 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:
- cid : Alert Group Unique ID (required)
- subscription_name : Group Member Name (required)
- subscription_mobile : Group Member Mobile No (required)
Returns:
- If SUCCESS, response will be
RESULT=SUCCESS&REQUEST=DELETE_SMS_SUBSCRIPTION&RESPONSE=SMS Subscription Deleted Successfully - 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:
- cid : Alert Group Unique ID (required)
- start_time : Start Date Time (YYYY-MM-DD HH:MM:SS) for Search (required)
- end_time : End Date Time (YYYY-MM-DD HH:MM:SS) for Search (required)
Returns:
- {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