SMS API
Send SMS, voice, and OTP across Ghana
Authentication
All requests use the base URL https://ladill.com/api
and a Bearer API key. Create a key in sms.ladill.com → API services. Keys begin with
lsk_sms_live_.
Authorization: Bearer lsk_sms_live_your_key
Send an SMS
/sms/send
Send a single text message. Numbers may be local (024…) or international (233…) format.
Parameters
to
|
string required | Recipient phone number, e.g. 0241234567 or 233241234567. |
text
|
string required | Message body (up to 1600 characters; billed per 160-char segment). |
sender_id
|
string optional | Approved alphanumeric sender ID (max 11 chars). Defaults to your account sender. |
curl -X POST https://ladill.com/api/sms/send \
-H "Authorization: Bearer lsk_sms_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "0241234567",
"text": "Hello from Ladill"
}'
{
"success": true,
"message_id": 12345,
"provider_message_id": "1ad346d3-…",
"segments": 1,
"sender_id": "Ladill",
"balance_ghs": 19.57
}
Send a voice message
/sms/send/voice
Place an automated voice call to a list of recipients. Provide a hosted voice_file URL or upload an MP3/WAV file as multipart form-data.
Parameters
recipients
|
string[] required | Array of phone numbers (1–100). |
voice_file
|
string optional | Public URL to an MP3/WAV file. Required unless uploading voice. |
voice
|
file optional | MP3/WAV upload (multipart). Required unless voice_file is set. |
voice_id
|
string optional | Reuse a previously uploaded voice file by id. |
curl -X POST https://ladill.com/api/sms/send/voice \
-H "Authorization: Bearer lsk_sms_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"recipients": ["0241234567", "0209876543"],
"voice_file": "https://example.com/message.mp3"
}'
{
"success": true,
"campaign_id": 88,
"recipients": 2,
"price_per_call": 0.30,
"balance_ghs": 18.97
}
Send an OTP
/sms/send/otp
Generate and send a one-time passcode by SMS or voice. Ladill stores and validates the code — verify it with the endpoint below.
Parameters
to
|
string required | Recipient phone number. |
medium
|
string optional | sms (default) or voice. |
type
|
string optional | numeric (default) or alphanumeric. |
length
|
integer optional | Code length, 6–15 (default 6). |
expiry
|
integer optional | Minutes until the code expires, 1–10 (default 5). |
message
|
string optional | Custom template; use %otp_code% as the placeholder. |
sender_id
|
string optional | Approved sender ID for the OTP message. |
curl -X POST https://ladill.com/api/sms/send/otp \
-H "Authorization: Bearer lsk_sms_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "0241234567",
"length": 6,
"expiry": 5
}'
{
"success": true,
"message_id": 12346,
"price": 0.06,
"balance_ghs": 18.91
}
Verify an OTP
/sms/verify/otp
Check a code entered by the user against the most recent OTP sent to that number.
Parameters
to
|
string required | The phone number the OTP was sent to. |
code
|
string required | The code the user entered. |
curl -X POST https://ladill.com/api/sms/verify/otp \
-H "Authorization: Bearer lsk_sms_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "0241234567",
"code": "482913"
}'
{
"valid": true,
"message": "Verification successful."
}
Delivery reports
Set a delivery callback in sms.ladill.com to receive status updates (delivered, failed) for each message. Ladill POSTs a JSON payload to your URL with the provider message id and status.
Errors
Errors use standard HTTP status codes with a JSON error message.
401 |
Invalid or missing API key. |
402 |
Insufficient wallet balance — top up to continue. |
422 |
Validation failed (missing or invalid parameters). |
429 |
Rate limit exceeded — retry after the seconds in retry_after. |
500 |
Send failed at the provider — safe to retry; charges are refunded. |
Ready to grow your business?
Join hundreds of businesses running everything on Ladill — payments, storefronts, QR codes, email, SMS, and more, all from one account. Get set up in minutes.
No credit card required • Free to start • 24/7 support