1. Account - Get Partner Earnings
This endpoint allows you to retrieve your partner earnings. It requires the get_earnings
API permission.
GET: https://sys.wasms.net/api/get/earnings
Parameters:
Field | Type | Description |
secret |
String | The API secret you copied from the Tools -> API Keys page. |
Success Response Format:
Field | Type | Description |
status |
Number | Status code (200 = Success) |
message |
String | Response message |
data |
Array | Array of earnings data |
Example Success Response:
{
"status": 200,
"message": "Partner Credits",
"data": {
"earnings": "1.43638",
"currency": "GBP"
}
}
Error Response Format:
Field | Type | Description |
status |
Number | Status code: 400, 401, 403, 500 |
message |
String | Error message |
data |
Array | Any additional data (usually empty) |
Example PHP Request:
$apiSecret = "API_SECRET"; // your API secret from (Tools -> API Keys) page
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "https://sys.wasms.net/api/get/earnings?secret={$apiSecret}");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
print_r($result);
2. Account - Get Remaining Credits
This endpoint allows you to check your remaining credits. It requires the get_credits
API permission.
GET: https://sys.wasms.net/api/get/credits
Parameters:
Field | Type | Description |
secret |
String | The API secret you copied from the Tools -> API Keys page. |
Success Response Format:
Field | Type | Description |
status |
Number | Status code (200 = Success) |
message |
String | Response message |
data |
Array | Array of credits data |
Example Success Response:
{
"status": 200,
"message": "Remaining Credits",
"data": {
"credits": "798.634",
"currency": "GBP"
}
}
Error Response Format:
Field | Type | Description |
status |
Number | Status code: 400, 401, 403, 500 |
message |
String | Error message |
data |
Array | Any additional data (usually empty) |
Example PHP Request:
$apiSecret = "API_SECRET"; // your API secret from (Tools -> API Keys) page
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "https://sys.wasms.net/api/get/credits?secret={$apiSecret}");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
print_r($result);
3. Account - Get Subscription Package
This endpoint allows you to retrieve details about your subscription package. It requires the get_subscription
API permission.
GET: https://sys.wasms.net/api/get/subscription
Parameters:
Field | Type | Description |
secret |
String | The API secret you copied from the Tools -> API Keys page. |
Success Response Format:
Field | Type | Description |
status |
Number | Status code (200 = Success) |
message |
String | Response message |
data |
Array | Array of subscription data |
Example Success Response:
{
"status": 200,
"message": "Subscription Package",
"data": {
"name": "Starter",
"usage": {
"sms_send": {
"used": 262,
"limit": 1000
},
"sms_receive": {
"used": 139,
"limit": 250
},
"ussd": {
"used": 16,
"limit": 0
},
"notifications": {
"used": 55,
"limit": 0
},
"contacts": {
"used": 7,
"limit": 50
},
"devices": {
"used": 3,
"limit": 3
},
"apikeys": {
"used": 4,
"limit": 5
},
"webhooks": {
"used": 1,
"limit": 5
},
"actions": {
"used": 3,
"limit": 0
},
"scheduled": {
"used": 0,
"limit": 0
},
"wa_send": {
"used": 3,
"limit": 0
},
"wa_receive": {
"used": 19,
"limit": 0
},
"wa_accounts": {
"used": 1,
"limit": 0
}
}
}
}
Error Response Format:
Field | Type | Description |
status |
Number | Status code: 400, 401, 403, 500 |
message |
String | Error message |
data |
Array | Any additional data (usually empty) |
Example PHP Request:
$apiSecret = "API_SECRET"; // your API secret from (Tools -> API Keys) page
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "https://sys.wasms.net/api/get/subscription?secret={$apiSecret}");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
print_r($result);
Conclusion
The WaSMS.Net Account API provides endpoints that allow you to retrieve vital account information, including partner earnings, remaining credits, and subscription details. By following this guide, you can seamlessly integrate these APIs into your system and automate account management processes. Ensure that you have the necessary API permissions (get_earnings
, get_credits
, get_subscription
) and use your API secret when making requests.
For more information, visit the Tools -> API Keys page in your WaSMS.Net account or contact our support team.