Introduction
The HOLNET SMS API lets you send SMS messages programmatically. It is RESTful, uses JSON
for requests and responses, and supports both single and bulk messaging.
Pro Tip: All API requests must use HTTPS and include your API key in the request body.
Authentication
Pass your API key in the JSON body of every request:
{
"api_key": "your_api_key_here"
}
Your API key is unique to your account. Keep it confidential. Find it on your dashboard.
Base URL
All API requests should be made to:
https://sms.holnetfiber.co.za/api/
Example — get balance:
POST https://sms.holnetfiber.co.za/api/get_balance
Send SMS
Send a single SMS message to a recipient.
POST /api/send_sms
Request Parameters
| Parameter | Type | Required | Description |
api_key | String | Yes | Your API authentication key |
recipient | String | Yes | Phone number (2547XXXXXXXX or 07XXXXXXXX) |
message | String | Yes | SMS content (max 160 chars per unit) |
sender_id | String | Optional | Sender ID (defaults to account sender, e.g. HOLNET) |
Request Example
{
"api_key": "your_api_key_here",
"recipient": "254794839386",
"message": "Hello from HOLNET SMS API!",
"sender_id": "HOLNET"
}
Response Example (Success)
{
"success": true,
"message": "SMS sent successfully!",
"message_id": "HNET-1768205981-4521",
"recipient": "254794839386",
"sender_id": "HOLNET",
"units_used": 1,
"message_length": 28,
"cost": 0.3,
"new_balance": 4999.7,
"simulation_mode": false
}
Response Example (Error)
{
"success": false,
"message": "Failed to send SMS",
"error": "Insufficient SMS balance",
"sender_id_used": "HOLNET"
}
Bulk SMS
Send SMS messages to multiple recipients at once.
POST /api/send_bulk_sms
Request Parameters
| Parameter | Type | Required | Description |
api_key | String | Yes | Your API authentication key |
recipients | Array | Yes | Array of recipient phone numbers |
message | String | Yes | SMS message content |
sender_id | String | Optional | Sender ID (defaults to HOLNET) |
Request Example
{
"api_key": "your_api_key_here",
"recipients": ["254794839386", "254700000001"],
"message": "Special offer just for you!",
"sender_id": "HOLNET"
}
Response Example (Success)
{
"success": true,
"message": "Bulk SMS sent: 2 successful, 0 failed",
"statistics": {
"total_attempted": 2,
"successful": 2,
"failed": 0,
"invalid_numbers": 0
},
"sender_id": "HOLNET",
"units_used": 2,
"total_cost": 0.6,
"new_balance": 4999.1,
"message_ids": {
"254794839386": "HNET-1768206118-1001",
"254700000001": "HNET-1768206119-1002"
}
}
Check Status
Check the delivery status of a sent SMS message.
POST /api/check_status
Request Parameters
| Parameter | Type | Required | Description |
api_key | String | Yes | Your API authentication key |
message_id | String | Yes | Message ID from send_sms or send_bulk_sms |
Request Example
{
"api_key": "your_api_key_here",
"message_id": "HNET-1768206116-1001"
}
Response Example
{
"success": true,
"message_id": "HNET-1768206116-1001",
"recipient": "254794839386",
"sender_id": "HOLNET",
"status": "sent",
"units_used": 1,
"cost": "0.30",
"created_at": "2026-09-21 01:21:56",
"message_preview": "Test SMS at 01:21:55"
}
Get Balance
Get your account balance and profile information.
POST /api/get_balance
Request Parameters
| Parameter | Type | Required | Description |
api_key | String | Yes | Your API authentication key |
Request Example
{ "api_key": "your_api_key_here" }
Response Example
{
"success": true,
"user_id": 1,
"username": "admin",
"email": "admin@holnetfiber.co.za",
"sms_balance": 5000,
"default_sender_id": "HOLNET",
"sms_cost_per_unit": "0.30",
"timestamp": "2026-09-21 01:21:55"
}
Test Connection
POST /api/test_connection
{ "api_key": "your_api_key_here" }
Code Examples
cURL — Get Balance
curl -X POST https://sms.holnetfiber.co.za/api/get_balance \
-H "Content-Type: application/json" \
-d '{"api_key":"your_api_key_here"}'
cURL — Send SMS
curl -X POST https://sms.holnetfiber.co.za/api/send_sms \
-H "Content-Type: application/json" \
-d '{
"api_key": "your_api_key_here",
"recipient": "254794839386",
"message": "Test message from cURL",
"sender_id": "HOLNET"
}'
PowerShell — Send SMS
$body = @{
api_key = "your_api_key_here"
recipient = "254794839386"
message = "Test from PowerShell"
sender_id = "HOLNET"
} | ConvertTo-Json
Invoke-RestMethod -Uri "https://sms.holnetfiber.co.za/api/send_sms" `
-Method Post -Body $body -ContentType "application/json"
Python — Send SMS
import requests, json
url = "https://sms.holnetfiber.co.za/api/send_sms"
payload = {
"api_key": "your_api_key_here",
"recipient": "254794839386",
"message": "Test from Python",
"sender_id": "HOLNET"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(json.dumps(response.json(), indent=2))
Frequently Asked Questions
What phone number formats are accepted?
We accept 2547XXXXXXXX and 07XXXXXXXX. The API converts 07 numbers to 254 format automatically.
How are messages charged?
Messages are charged per SMS unit. 1 unit = 160 characters. Longer messages are split (153 characters per subsequent part).
What sender IDs can I use?
Use an approved sender ID on your account (default HOLNET). Invalid sender IDs will return an error.
How can I test without sending real SMS?
Ask an admin to enable simulation mode in the dashboard. API calls then simulate sending without charging credits.
Need Help?
Check API error messages, verify your API key, and confirm phone number format.
Support: 0794839386