WilCybertek SMS Gateway API
A direct, low-latency SMS gateway connecting your applications to Zambia's three major mobile networks — MTN, Airtel, and Zamtel — via physical on-premise GSM hardware. No international routing. No hidden relay fees.
Quickstart
Send your first SMS message in under 5 minutes. Follow these three steps:
curl -X POST https://sms.wilcybertek.com/api \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY_HERE",
"to": "260977000000",
"message": "Hello! This is my first WilCybertek SMS."
}'
Authentication
Every API request must include your unique API Key. This key identifies your account and authorizes credit deduction.
Including Your Key
Include your key in the JSON body of each POST request under the api_key field:
{
"api_key": "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6",
"to": "260977000000",
"message": "Your message here"
}
Send SMS
The primary endpoint for sending a single SMS message to any Zambian mobile number.
Request Parameters
Example Request
<?php // Send a single SMS via WilCybertek API $url = "https://sms.wilcybertek.com/api"; $payload = json_encode([ "api_key" => "YOUR_API_KEY", "to" => "260977000000", "message" => "Your account balance is K250.00", "sender_id" => "MyBusiness" // optional ]); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["Content-Type: application/json"] ]); $response = json_decode(curl_exec($ch), true); curl_close($ch); if ($response['status'] === 'queued') { echo "✓ Message queued: " . $response['message_id']; }
Response
{
"status": "queued",
"message_id": "MSG-1712345678-A3F9",
"recipient": "260977000000",
"credits_used": 1,
"credits_remaining": 249
}
{
"status": "error",
"code": "INVALID_KEY",
"message": "The provided API key is invalid or inactive."
}
Bulk SMS
Send the same message to multiple recipients in a single API call. Ideal for marketing campaigns, OTP broadcasts, or system alerts.
Example Request
{
"api_key": "YOUR_API_KEY",
"recipients": [
"260977000001",
"260966000002",
"260955000003"
],
"message": "Flash sale! 30% off all services today only."
}
Check Balance
Retrieve your current SMS credit balance programmatically without logging into the dashboard.
{
"status": "ok",
"balance": 249,
"currency": "SMS_CREDITS"
}
Message Logs
Retrieve a paginated list of your recent message activity including delivery statuses.
Query Parameters
Supported Networks
WilCybertek routes messages through physical Android gateway hardware with active local SIM cards — ensuring your messages never leave Zambia's mobile network infrastructure.
Phone Number Formatting
All phone numbers must be submitted in Zambian international format.
Rate Limits
To maintain fair usage and quality of service across all developers, the following rate limits apply:
Error Codes
All errors return a JSON body with a code and human-readable message field.
Security Best Practices
Follow these guidelines to keep your account and your users' data safe.
WCT_API_KEY) rather than hardcoding it in source files that may end up in version control.PHP Examples
<?php function sendOTP($phone, $otp): bool { $url = "https://sms.wilcybertek.com/api"; $api_key = getenv("WCT_API_KEY"); // Store in environment $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["Content-Type: application/json"], CURLOPT_POSTFIELDS => json_encode([ "api_key" => $api_key, "to" => $phone, "message" => "Your verification code is: {$otp}. Valid for 5 minutes." ]) ]); $res = json_decode(curl_exec($ch), true); curl_close($ch); return ($res['status'] ?? '') === 'queued'; } // Usage $otp = rand(100000, 999999); if (sendOTP("260977000000", $otp)) { echo "OTP sent successfully!"; }
Python Examples
import os
import requests
def send_sms(to: str, message: str) -> dict:
response = requests.post(
"https://sms.wilcybertek.com/api",
json={
"api_key": os.environ["WCT_API_KEY"],
"to": to,
"message": message
},
timeout=10
)
response.raise_for_status()
return response.json()
# Usage
try:
result = send_sms("260977000000", "Payment confirmed. Thank you!")
print(f"Queued: {result['message_id']}")
print(f"Credits remaining: {result['credits_remaining']}")
except requests.HTTPError as e:
print(f"API Error: {e.response.json()['message']}")
JavaScript Examples
// Never use this in browser-side code! const sendSMS = async (to, message) => { const response = await fetch("https://sms.wilcybertek.com/api", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ api_key: process.env.WCT_API_KEY, to, message }) }); if (!response.ok) { const err = await response.json(); throw new Error(err.message); } return response.json(); }; // Usage sendSMS("260977000000", "Your order is ready for pickup!") .then(data => console.log(`Sent: ${data.message_id}`)) .catch(err => console.error(`Failed: ${err.message}`));
cURL Examples
curl -X POST https://sms.wilcybertek.com/api/bulk \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"recipients": [
"260977000001",
"260966000002",
"260955000003"
],
"message": "System maintenance tonight 22:00-23:00. Thank you for your patience."
}'
Start Sending SMS in Minutes
Create your free developer account, get your API key, and connect your application to Zambia's fastest SMS gateway.