Notification Settings API
Introduction to Notification Settings API
Welcome to SMSGatewayCenter's Notification Settings API! This powerful API allows mobile app users to view and update their notification preferences for all messaging services. Configure alerts for SMS API, WhatsApp Business API, and Voice Call API. Settings are automatically filtered based on your account's allowed products, ensuring you only see relevant notification options. Our RESTful endpoints support POST and GET methods over HTTP for secure, flexible integration.
About Notification Settings
The Notification Settings API enables you to:
- Read current notification preferences for your account
- Update notification settings including balance alerts, usage summaries, and login notifications
- Configure product-specific alerts for SMS, WhatsApp, and Voice Call services
- Manage reseller alerts (for reseller accounts only)
All notification settings support multiple comma-separated email addresses for each alert type.
Read Notification Settings
Retrieve current notification preferences for the authenticated user. The API automatically returns only settings for products your account has access to.
API Endpoint
https://unify.smsgateway.center/SMSApi/notifications/readHTTP Method
POST GET
| Key | Value | Description |
|---|---|---|
| Login Credentials (Required) | ||
| Authenticate your API request using userid-password or apiKey—choose one method. | ||
| userid | Your Registered Username | Your registered username; use if apiKey isn't provided. Signup for User ID |
| password | Your Password | URL-encoded password (for special characters); use if apiKey isn't provided. Signup for API Key |
| Header (optional) Parameters | ||
| apiKey | Your unique apiKey | apiKey needs to be sent as HTTP header when you are not using userid-password method. You can avail this from your user control panel and use instead of userid-password HTTP Request parameter. Please do not disclose this to anyone. |
| Parameter | Type | Required | Description |
|---|---|---|---|
output | String | Optional | Response format. Use json for JSON response (recommended) |
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://unify.smsgateway.center/SMSApi/notifications/read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "userid=YourUsername&password=YourPassword&output=json",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"response": {
"api": "notifications",
"action": "read",
"status": "success",
"msg": "Notification settings retrieved successfully",
"code": 200,
"count": 1,
"notifications": {
"balanceAlerts": {
"enabled": true,
"smsBalance": 1000,
"smsAmount": "50.0000",
"emails": "[email protected],[email protected]",
"dailyBalanceAlert": {
"enabled": true,
"emails": "[email protected]"
}
},
"smsAlerts": {
"dailyUsageSummary": {"enabled": true, "emails": "[email protected]"},
"weeklyUsageSummary": {"enabled": false, "emails": ""},
"monthlyUsageSummary": {"enabled": false, "emails": ""},
"monthlyDaywiseUsageSummary": {"enabled": false, "emails": ""},
"latencyAlert": {"enabled": false, "emails": ""}
},
"creditTransactionAlerts": {
"weeklySummary": {"enabled": false, "emails": ""},
"monthlySummary": {"enabled": false, "emails": ""}
},
"loginAlerts": {
"enabled": true,
"emails": "[email protected]"
}
}
}
}
Note: whatsappAlerts, voiceCallAlerts only appear if user has those products enabled. resellerAlerts only appear for reseller accounts (userType ≤ 2).
Update Notification Settings
Update notification preferences for the authenticated user. Only send parameters for products your account has access to—the API automatically filters settings based on allowed products.
API Endpoint
https://unify.smsgateway.center/SMSApi/notifications/updateHTTP Method
POST
| Key | Value | Description |
|---|---|---|
| Login Credentials (Required) | ||
| Authenticate your API request using userid-password or apiKey—choose one method. | ||
| userid | Your Registered Username | Your registered username; use if apiKey isn't provided. Signup for User ID |
| password | Your Password | URL-encoded password (for special characters); use if apiKey isn't provided. Signup for API Key |
| Header (optional) Parameters | ||
| apiKey | Your unique apiKey | apiKey needs to be sent as HTTP header when you are not using userid-password method. You can avail this from your user control panel and use instead of userid-password HTTP Request parameter. Please do not disclose this to anyone. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| Balance Alert Settings | |||
enableBalanceAlert | Integer | Optional | Enable balance alert: 1 = enabled, 0 = disabled |
smsBalance | Integer | Optional | SMS balance threshold for alert trigger |
smsAmount | Decimal | Optional | Amount threshold for alert (e.g., "50.00") |
smsBalanceEmails | String | Optional | Comma-separated email addresses for balance alerts |
dailyBalanceAlert | Integer | Optional | Enable daily balance alert: 1 = enabled, 0 = disabled |
dailyBalanceAlertEmails | String | Optional | Comma-separated email addresses for daily balance alerts |
| Credit Transaction Alerts | |||
enableWeeklyCreditTransaction | Integer | Optional | Enable weekly credit transaction summary: 1 = enabled, 0 = disabled |
weeklyCreditTransactionEmails | String | Optional | Comma-separated email addresses for weekly credit summaries |
enableMonthlyCreditTransaction | Integer | Optional | Enable monthly credit transaction summary: 1 = enabled, 0 = disabled |
monthlyCreditTransactionEmails | String | Optional | Comma-separated email addresses for monthly credit summaries |
| Login Alerts | |||
enableLoginAlert | Integer | Optional | Enable login alert: 1 = enabled, 0 = disabled |
loginAlertEmails | String | Optional | Comma-separated email addresses for login alerts |
| Output Format | |||
output | String | Optional | Response format. Use json for JSON response (recommended) |
| Parameter | Type | Required | Description |
|---|---|---|---|
enableDailyUsageSummary | Integer | Optional | Enable daily SMS usage summary: 1 = enabled, 0 = disabled |
dailyUsageSummaryEmails | String | Optional | Comma-separated email addresses for daily SMS usage summaries |
enableWeeklyUsageSummary | Integer | Optional | Enable weekly SMS usage summary: 1 = enabled, 0 = disabled |
weeklyUsageSummaryEmails | String | Optional | Comma-separated email addresses for weekly SMS usage summaries |
enableMonthlyUsageSummary | Integer | Optional | Enable monthly SMS usage summary: 1 = enabled, 0 = disabled |
monthlyUsageSummaryEmails | String | Optional | Comma-separated email addresses for monthly SMS usage summaries |
enableMonthlyDaywiseUsageSummary | Integer | Optional | Enable monthly daywise SMS usage summary: 1 = enabled, 0 = disabled |
monthlyDaywiseUsageSummaryEmails | String | Optional | Comma-separated email addresses for monthly daywise SMS usage summaries |
latencyAlert | Integer | Optional | Enable SMS latency alert: 1 = enabled, 0 = disabled |
latencyAlertEmails | String | Optional | Comma-separated email addresses for SMS latency alerts |
| Parameter | Type | Required | Description |
|---|---|---|---|
enableWaDailyUsageSummary | Integer | Optional | Enable daily WhatsApp usage summary: 1 = enabled, 0 = disabled |
waDailyUsageSummaryEmails | String | Optional | Comma-separated email addresses for daily WhatsApp usage summaries |
enableWaWeeklyUsageSummary | Integer | Optional | Enable weekly WhatsApp usage summary: 1 = enabled, 0 = disabled |
waWeeklyUsageSummaryEmails | String | Optional | Comma-separated email addresses for weekly WhatsApp usage summaries |
enableWaMonthlyUsageSummary | Integer | Optional | Enable monthly WhatsApp usage summary: 1 = enabled, 0 = disabled |
waMonthlyUsageSummaryEmails | String | Optional | Comma-separated email addresses for monthly WhatsApp usage summaries |
| Parameter | Type | Required | Description |
|---|---|---|---|
enableVcDailyUsageSummary | Integer | Optional | Enable daily Voice Call usage summary: 1 = enabled, 0 = disabled |
vcDailyUsageSummaryEmails | String | Optional | Comma-separated email addresses for daily Voice Call usage summaries |
enableVcWeeklyUsageSummary | Integer | Optional | Enable weekly Voice Call usage summary: 1 = enabled, 0 = disabled |
vcWeeklyUsageSummaryEmails | String | Optional | Comma-separated email addresses for weekly Voice Call usage summaries |
enableVcMonthlyUsageSummary | Integer | Optional | Enable monthly Voice Call usage summary: 1 = enabled, 0 = disabled |
vcMonthlyUsageSummaryEmails | String | Optional | Comma-separated email addresses for monthly Voice Call usage summaries |
enableVcMonthlyDaywiseUsageSummary | Integer | Optional | Enable monthly daywise Voice Call usage summary: 1 = enabled, 0 = disabled |
vcMonthlyDaywiseUsageSummaryEmails | String | Optional | Comma-separated email addresses for monthly daywise Voice Call usage summaries |
| Parameter | Type | Required | Description |
|---|---|---|---|
enableUsersBalance | Integer | Optional | Enable daily users balance alert for resellers: 1 = enabled, 0 = disabled |
usersBalanceEmails | String | Optional | Comma-separated email addresses for reseller users balance alerts |
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://unify.smsgateway.center/SMSApi/notifications/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "userid=YourUsername&password=YourPassword&enableBalanceAlert=1&smsBalance=1000&smsAmount=50.00&[email protected],[email protected]&dailyBalanceAlert=1&[email protected]&enableDailyUsageSummary=1&[email protected]&enableWeeklyUsageSummary=0&weeklyUsageSummaryEmails=&enableMonthlyUsageSummary=1&[email protected]&enableMonthlyDaywiseUsageSummary=0&monthlyDaywiseUsageSummaryEmails=&enableWeeklyCreditTransaction=1&[email protected]&enableMonthlyCreditTransaction=0&monthlyCreditTransactionEmails=&enableLoginAlert=1&[email protected]&latencyAlert=0&latencyAlertEmails=&output=json",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"response": {
"api": "notifications",
"action": "update",
"status": "success",
"msg": "Notification settings updated successfully",
"code": 200,
"count": 1,
"update": {
"userId": 123,
"updated": true,
"timestamp": "2025-12-04T18:00:00+05:30"
}
}
}
Error Codes
| Error Code | HTTP Status | Description |
|---|---|---|
200 | 200 | Success - Request completed successfully |
475 | 400 | Invalid action. Supported actions: read, update |
476 | 500 | An error occurred while retrieving notification settings |
477 | 400 | Email validation error - Invalid email format detected |
478 | 400 | Failed to update notification settings. No changes made or nothing to update |
479 | 500 | An error occurred while updating notification settings |
480 | 405 | Create action is not supported. Use update action instead |
481 | 405 | Delete action is not available via API |
Important Notes
Product-Based Filtering
- Only send parameters for products your account has access to
- The API automatically filters settings based on user's allowed products
- SMS alerts require Product ID: 1
- WhatsApp alerts require Product ID: 5
- Voice Call alerts require Product ID: 3
- Reseller alerts only work for reseller accounts (userType ≤ 2)
Email Validation
- All email fields support comma-separated multiple emails
- Email validation is performed on all email fields
- Invalid email addresses will result in error code 477
Best Practices
- Use the
readaction first to retrieve current settings before updating - Only include parameters you want to change in the update request
- Test email addresses to ensure notifications are received
- Configure balance alerts to avoid service interruption
- Set appropriate thresholds for balance and usage alerts
Integration Examples
Example 1: Enable Balance Alerts Only
curl --location 'https://unify.smsgateway.center/SMSApi/notifications/update' \
--form 'userid="your_username"' \
--form 'password="your_password"' \
--form 'enableBalanceAlert="1"' \
--form 'smsBalance="1000"' \
--form 'smsAmount="50.00"' \
--form 'smsBalanceEmails="[email protected]"' \
--form 'output="json"'Example 2: Enable Daily Usage Summary for SMS
curl --location 'https://unify.smsgateway.center/SMSApi/notifications/update' \
--form 'userid="your_username"' \
--form 'password="your_password"' \
--form 'enableDailyUsageSummary="1"' \
--form 'dailyUsageSummaryEmails="[email protected],[email protected]"' \
--form 'output="json"'Example 3: Configure WhatsApp Alerts
curl --location 'https://unify.smsgateway.center/SMSApi/notifications/update' \
--form 'userid="your_username"' \
--form 'password="your_password"' \
--form 'enableWaDailyUsageSummary="1"' \
--form 'waDailyUsageSummaryEmails="[email protected]"' \
--form 'enableWaWeeklyUsageSummary="1"' \
--form 'waWeeklyUsageSummaryEmails="[email protected]"' \
--form 'output="json"'Example 4: Reseller Configuration
curl --location 'https://unify.smsgateway.center/SMSApi/notifications/update' \
--form 'userid="reseller_username"' \
--form 'password="reseller_password"' \
--form 'enableUsersBalance="1"' \
--form 'usersBalanceEmails="[email protected]"' \
--form 'output="json"'Testimonials
Why do Great Businesses Trust SMS Gateway Center?

