Fast & Reliable SMS & OTP Service for Ghana
Base URL: https://joagyapongltd.com/sms_api/
Required Header:
X-Client-Key: your-api-key-here
All endpoints use POST. Include the header in every call.
Endpoint: POST /send_sms.php
Send a single message to one Ghana number.
{
"to": "0243930223",
"message": "Hello, this is a test message!"
}
{
"success": true,
"message": "SMS sent successfully",
"data": {
"request_id": "7",
"message_id": "7",
"provider_status": "delivered",
"segments": 1,
"cost": 0.1
}
}
curl -X POST https://joagyapongltd.com/sendexa/send_sms.php \
-H "X-Client-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"to":"0243930223","message":"Hello from Jo Agy Ltd!"}'
final response = await http.post(
Uri.parse('https://joagyapongltd.com/sendexa/send_sms.php'),
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: jsonEncode({
"to": "0243930223",
"message": "Hello, this is a test!",
}),
);
fetch('https://joagyapongltd.com/sendexa/send_sms.php', {
method: 'POST',
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
to: '0243930223',
message: 'Hello, this is a test!'
})
})
.then(res => res.json())
.then(data => console.log('Success:', data))
.catch(err => console.error('Error:', err));
Endpoint: POST /send_sms.php
Send multiple messages (up to 1000) in one request.
{
"messages": [
{
"to": "0243930223",
"message": "Hello John! 20% off today"
},
{
"to": "0272972512",
"message": "Hello Sarah! 20% off today"
},
{
"to": "0540519119",
"message": "Hello everyone! 20% off today"
}
]
}
{
"success": true,
"message": "Bulk SMS processing completed",
"data": {
"request_id": "10",
"total_messages": 3,
"successful": 3,
"failed": 0,
"invalid": 0,
"total_cost": 0.3,
"actual_cost": 0.3,
"invalid_messages": []
}
}
curl -X POST https://joagyapongltd.com/sendexa/send_sms.php \
-H "X-Client-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"to":"0243930223","message":"Bulk test from Salifu"},
{"to":"0272972512","message":"Bulk test from Salifu"},
{"to":"0540519119","message":"Bulk test from Salifu"}
]
}'
final phones = ["0243930223", "0272972512", "0540519119"];
final msg = "Hello everyone! 20% off today";
final payload = {
"messages": phones.map((p) => {"to": p, "message": msg}).toList(),
};
final response = await http.post(
Uri.parse('https://joagyapongltd.com/sendexa/send_sms.php'),
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: jsonEncode(payload),
);
const phones = ["0243930223", "0272972512", "0540519119"];
const message = "Hello everyone! 20% off today";
const payload = {
messages: phones.map(phone => ({
to: phone,
message: message
}))
};
fetch('https://joagyapongltd.com/sendexa/send_sms.php', {
method: 'POST',
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify(payload)
})
.then(res => res.json())
.then(data => console.log('Success:', data))
.catch(err => console.error('Error:', err));
Endpoint: POST /send_otp.php
Send a 6-digit OTP via SMS.
{
"phone": "0243930223"
}
{
"success": true,
"message": "OTP sent successfully",
"data": {
"id": "12",
"phone": "233243930223",
"channel": "SMS",
"pinLength": 6,
"pinType": "NUMERIC",
"expiry": { "amount": 10, "duration": "minutes", "expiresAt": "..." }
}
}
curl -X POST https://joagyapongltd.com/sendexa/send_otp.php \
-H "X-Client-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"phone":"0243930223"}'
final response = await http.post(
Uri.parse('https://joagyapongltd.com/sendexa/send_otp.php'),
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: jsonEncode({"phone": "0243930223"}),
);
fetch('https://joagyapongltd.com/sendexa/send_otp.php', {
method: 'POST',
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ phone: '0243930223' })
})
.then(res => res.json())
.then(data => console.log('Success:', data))
.catch(err => console.error('Error:', err));
Endpoint: POST /verify_otp.php
Validate the OTP code entered by the user.
{
"phone": "0243930223",
"code": "400985"
}
{
"success": true,
"message": "Access code verified successfully",
"data": {
"phone": "233243930223",
"verifiedAt": "2026-02-01 19:45:21"
}
}
curl -X POST https://joagyapongltd.com/sendexa/verify_otp.php \
-H "X-Client-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"phone":"0243930223","code":"400985"}'
final response = await http.post(
Uri.parse('https://joagyapongltd.com/sendexa/verify_otp.php'),
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: jsonEncode({
"phone": "0243930223",
"code": "400985",
}),
);
fetch('https://joagyapongltd.com/sendexa/verify_otp.php', {
method: 'POST',
headers: {
'X-Client-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
phone: '0243930223',
code: '400985'
})
})
.then(res => res.json())
.then(data => console.log('Success:', data))
.catch(err => console.error('Error:', err));
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 402 | Insufficient balance |
| 429 | Rate limit exceeded |
| 400 | Invalid input (phone, message, format) |
| 500 | Server error — contact support |
Important Notes:
• Use valid Ghana numbers (024xxxxxxx or 23324xxxxxx format)
• Bulk supports up to 1000 messages per request
• OTP expires in 10 minutes by default
• All costs are in Ghana Cedis (GHS)