You’ve sent your first test SMS through the API. Now comes the part the quickstart skipped.
Operationalizing SMS API integration in Ghana and Nigeria means three things: receiving delivery-status callbacks on your own server, getting your brand name approved as a sender ID, and deciding whether you need a short code or a dedicated number for two-way replies.
This guide covers all three — with working code, delivery webhooks, and the per-country compliance details that trip up developers who copy-paste from global tutorials.
What Is a Bulk SMS API and How Does It Work?
A bulk SMS API is a REST interface that lets your application send text messages programmatically — one message or millions. Instead of logging into a web dashboard, your code makes HTTP requests to send SMS, check delivery status, and receive real-time webhooks when messages land or fail.
The architecture is straightforward:
- Your application sends an authenticated HTTP POST with the recipient number, sender ID, and message body.
- The SMS gateway validates the request, routes it to the right mobile network operator (MNO), and returns a message ID.
- The MNO delivers the message to the handset. In Ghana, that’s MTN, Telecel, or AirtelTigo.
- A delivery webhook fires back to your server confirming delivery, failure, or pending status.
Nigeria adds its own set of networks. In Nigeria, Arkesel reaches every major mobile network — MTN, Glo, Airtel, and 9mobile — for delivery to any Nigerian number.
The difference between providers comes down to routing quality. Direct carrier connections mean your message travels one hop from gateway to MNO. Aggregated routing means it passes through intermediaries, adding latency, reducing delivery visibility, and creating failure points.
For time-critical messages like OTPs or payment confirmations, that routing difference decides whether your user gets their code in seconds or gives up waiting.
The 60-Second Integration Recap
Before the deep dives, here’s the entire send path in one breath.
Sending an SMS with the Arkesel SMS API is a single authenticated HTTP POST to https://sms.arkesel.com/api/v2/sms/send. You authenticate with your API key in the request header, and you pass the recipient and message in a JSON body with Content-Type: application/json. No session to manage, no SDK to install.
Arkesel publishes copy-paste code samples in cURL, Python, Node.js, and PHP, with no official SDK client libraries to install — the samples work directly with any language’s standard HTTP client.
Arkesel’s SMS Platform is available across Ghana, Nigeria, Kenya, South Africa, and Tanzania, so the integration you build for Ghana and Nigeria uses the same API and the same account.
If you’re just getting started, the Arkesel Developer API landing pages are the canonical starting points: the Developer API for Ghana and the Developer API for Nigeria. The full endpoint reference lives in the Arkesel developer documentation. This guide is the layer beneath them — what to do once that first message sends.
What to Evaluate in an SMS API for Ghana and Nigeria
Before you commit to a provider, run through this checklist. These criteria separate production-grade SMS APIs from demo-ready ones.
Direct MNO Connections vs Aggregated Routing
Does the provider maintain direct connections to the local mobile networks? In Ghana, that means MTN, Telecel, and AirtelTigo. In Nigeria, it means reaching MTN, Glo, Airtel, and 9mobile. Direct connections deliver faster, report delivery status accurately, and avoid the “grey route” problem where messages arrive but delivery receipts never come back.
Ask specifically: “Do you route through direct carrier connections or through aggregators for Ghana and Nigeria traffic?”
Sandbox and Test Environment
A production-ready API gives you a sandbox to test message sending, webhook delivery, and error handling without spending credits or hitting live phone numbers. Without it, you’re debugging in production.
REST API and Code Samples
For most integrations, a clean REST API with well-documented endpoints matters more than official SDK client libraries. Check whether the provider offers:
- Clear endpoint documentation with request and response examples
- Copy-paste code samples in your language (Python, Node.js, PHP, cURL at minimum)
- Consistent error response formats
- Authentication that works with standard HTTP libraries
Official SDKs are a convenience, not a requirement. A well-designed REST API integrates in minutes with any language’s HTTP client.
Delivery Reports and Webhooks
Real-time delivery callbacks are non-negotiable for transactional SMS. You need to know, programmatically and within seconds, whether a message was delivered, rejected, or expired. Push-based webhooks beat polling.
Sender ID Handling
Alphanumeric sender IDs (your brand name instead of a random number) require network-level registration, and the rules differ between Ghana and Nigeria. Your provider should handle that registration and give you clear timelines for each market.
Do Not Disturb (DND) Compliance
Both Ghana and Nigeria operate Do-Not-Disturb controls at the network level, and the specific rules differ by market and change over time. Your provider’s API should either filter DND numbers before sending or document exactly how DND rejections surface in delivery reports. Sending to DND numbers wastes credits and can flag your sender ID.
Pricing Model
Look for transparent per-message pricing with volume tiers. Watch for hidden costs: sender ID registration fees, dedicated number charges, or minimum monthly commitments. See current pricing for how rates and tiers are published.
SMS API Provider Comparison for Ghana and Nigeria Developers
The Ghana and Nigeria SMS API market splits into two broad categories: Africa-based providers with direct local carrier connections, and global platforms with wider geographic coverage but often aggregated African routing.
| Criteria | Africa-based providers (direct carrier connections) | Global CPaaS platforms |
|---|---|---|
| Ghana routing | Direct connections to MTN, Telecel, AirtelTigo | Often reach Ghana through international aggregators |
| Nigeria routing | Reach MTN, Glo, Airtel, 9mobile in-market | Often reach Nigeria through international aggregators |
| Delivery visibility | Delivery receipts direct from the networks | Receipts depend on the aggregator chain |
| Local billing and support | Local-currency billing and in-region support hours | Typically foreign-currency billing, non-local support hours |
| Sender ID and DND handling | Handled per local market (Ghana, Nigeria) | Often generic, less localized |
| Best fit | Ghana- or Nigeria-primary apps (fintech OTPs, local commerce) | Apps spanning many countries with Africa as one region |
The Africa-Based Option
Arkesel runs a REST API with direct connections to Ghana’s MTN, Telecel, and AirtelTigo, and reaches across Nigeria’s MTN, Glo, Airtel, and 9mobile. Code samples come in cURL, Python, Node.js, and PHP, with real-time delivery webhooks and sender-ID registration handled from inside your account. See the Arkesel developer documentation for the full endpoint reference.
You’ll also encounter other Africa-focused providers in this market. Evaluate each against the same checklist above — direct carrier connections, a sandbox, delivery webhooks, and local sender-ID and DND handling for the specific countries you send to.
The Global Option
Global CPaaS platforms like Twilio and Vonage offer broad multi-country coverage and mature tooling. For Ghana- or Nigeria-primary traffic, confirm how they route in-country and whether they support local sender-ID registration and DND handling. Global platforms often reach African networks through aggregators rather than direct carrier links, which can affect delivery speed, receipt accuracy, and cost.
If your application spans dozens of countries with Africa as one region, a global provider with a local fallback may fit. If Ghana and Nigeria are primary, a direct-connection provider generally delivers better speed, delivery rates, and cost efficiency.
For a broader look at gateway selection criteria across the continent, see our SMS gateway selection guide for Africa.
How to Integrate a Bulk SMS API, Step by Step
This walkthrough uses Arkesel’s SMS API as the reference implementation. The pattern — authenticate, send, track delivery, handle errors — transfers to any REST-based provider.
Step 1: Create Your Account and Get API Credentials
Sign up for an Arkesel account and generate your API key from the dashboard. The key authenticates every request via the api-key header.
Store your key as an environment variable — never hardcode it:
export ARKESEL_API_KEY="your-api-key-here"Step 2: Send Your First SMS
The core operation is a single POST to https://sms.arkesel.com/api/v2/sms/send — your API key in the api-key header, and the sender ID, message, and recipient list in a JSON body.
cURL:
curl -X POST "https://sms.arkesel.com/api/v2/sms/send" \
-H "api-key: ${ARKESEL_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"sender": "YourBrand",
"message": "Your verification code is 483920. Valid for 5 minutes.",
"recipients": ["+233241234567"]
}'Python:
import os
import requests
api_key = os.environ["ARKESEL_API_KEY"]
response = requests.post(
"https://sms.arkesel.com/api/v2/sms/send",
headers={
"api-key": api_key,
"Content-Type": "application/json",
},
json={
"sender": "YourBrand",
"message": "Your order #4521 has shipped. Track at example.com/track",
"recipients": ["+233241234567"],
},
)
result = response.json()
print(f"Status: {result['status']}, Message: {result['message']}")Node.js:
const response = await fetch("https://sms.arkesel.com/api/v2/sms/send", {
method: "POST",
headers: {
"api-key": process.env.ARKESEL_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
sender: "YourBrand",
message: "Payment received. Ref: TXN-9482",
recipients: ["+233241234567"],
}),
});
const result = await response.json();
console.log(`Status: ${result.status}, Message: ${result.message}`);PHP:
$apiKey = getenv('ARKESEL_API_KEY');
$ch = curl_init("https://sms.arkesel.com/api/v2/sms/send");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"api-key: $apiKey",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
'sender' => 'YourBrand',
'message' => 'Your appointment is confirmed for tomorrow at 10:00 AM.',
'recipients' => ['+233241234567'],
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Status: {$response['status']}, Message: {$response['message']}";For additional endpoints (balance check, delivery reports, contacts), see the complete API documentation. For a broader walkthrough beyond the send endpoint, see our step-by-step Arkesel SMS API tutorial.
Step 3: Configure Delivery Webhooks
Set up an endpoint on your server to receive delivery-status callbacks. When the network confirms delivery or reports failure, the provider POSTs the status to your webhook URL. Configuring that URL and handling the payload well deserves its own treatment — see the dedicated delivery-callback section below for the full handler pattern.
Step 4: Handle Errors and Retries
Build retry logic for transient failures. Not every failed send deserves a retry:
| Error type | Action | Retry? |
|---|---|---|
| Network timeout | Retry with exponential backoff | Yes (max 3) |
| Rate limit exceeded (429) | Wait for the rate-limit reset | Yes (after delay) |
| Invalid number format | Fix the number, don’t retry | No |
| DND-blocked number | Skip — number opted out | No |
| Insufficient balance | Alert ops, pause sends | No |
| Server error (5xx) | Retry with backoff | Yes (max 3) |
Step 5: Register Your Sender ID
Alphanumeric sender IDs let recipients identify your brand instead of a random number. Registration happens at the network level and differs between Ghana and Nigeria — we cover both in depth in the sender-ID section below.
Step 6: Move to Production
Before going live:
- Confirm your webhook endpoint is publicly accessible and handles every status type
- Verify phone-number formatting (E.164: +233 for Ghana, +234 for Nigeria)
- Test with real numbers on every network in each market
- Set up balance alerts so you never run dry mid-campaign
- Confirm your sender ID registration is active in each country
How Do I Configure an SMS Delivery Callback (Webhook) URL?
A delivery callback (webhook) is how your server learns what happened to each message without polling. You expose a public URL, register it as your callback endpoint, and the provider sends an HTTP POST to that URL every time a message’s status changes — delivered, failed, expired, or rejected. Your handler reads the status, updates your records, and returns HTTP 200.
Here’s how to set it up.
1. Expose a public HTTPS endpoint. Your callback URL must be reachable from the public internet over HTTPS. In local development, tunnel to your machine; in production, use a stable, monitored route.
2. Register the URL. You point the provider at your endpoint. Providers vary on whether the callback URL is set in your account dashboard, passed per request, or both — confirm the exact method in the Arkesel developer documentation.
3. Handle the payload and acknowledge it. When a status changes, the provider POSTs a JSON payload describing the message and its new status. Parse it, persist it, and respond with HTTP 200 quickly.
The handler below shows the shape. The field names — message_id, status, error_code — are illustrative placeholders to show the pattern, not Arkesel’s confirmed payload schema. Confirm the exact field names and status values against the live Arkesel developer documentation before you wire this to production.
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route("/webhooks/sms-delivery", methods=["POST"])
def handle_delivery_report():
payload = request.json
# Field names below are ILLUSTRATIVE placeholders. Confirm the real payload
# schema against https://developers.arkesel.com/ before production.
message_id = payload["message_id"]
status = payload["status"]
update_message_status(message_id, status)
if status == "failed":
error_code = payload.get("error_code")
handle_delivery_failure(message_id, error_code)
return jsonify({"received": True}), 200Three things separate a toy handler from a production one:
Return HTTP 200 fast. Do the minimum synchronously — validate, enqueue, respond. Push heavy work like database writes onto a background queue so a slow dependency never makes the provider treat the callback as failed.
Make the handler idempotent. Providers retry callbacks they think didn’t land, so the same status can arrive more than once. Key each update on the provider’s message ID and treat repeats as no-ops. Never trigger side effects that assume exactly-once delivery.
Verify the callback is genuine. Your webhook URL is public, so anyone can POST to it. If your provider signs its callbacks, verify that signature before trusting the payload. Where signing isn’t available, restrict the endpoint by source IP and treat the message ID as a lookup key against messages you actually sent, rather than as trusted input.
For tracking delivery outcomes at scale — reporting, reconciliation, and fixing failed messages — see our guide on SMS delivery reports and tracking.
Sender IDs in Ghana and Nigeria: What They Are and How to Register
An alphanumeric sender ID is the name that appears in place of a phone number when your message arrives — “YourBank” instead of “+233…”. It’s how recipients recognize you at a glance, and it’s often the difference between a message that reads as official and one that reads as spam.
With Arkesel, you register your alphanumeric sender ID (your brand name) from inside your Arkesel account. You submit your brand name and the details each network requires, and the request goes to the operators for approval before you can send under it.
The rules differ by country, so treat Ghana and Nigeria separately.
Registering a Sender ID in Ghana
In Ghana, alphanumeric sender IDs are approved at the carrier level. You submit your preferred sender name with your business registration details, and approval often takes a few business days, though timelines vary by network and how complete your submission is. Until it’s approved, messages may go out from a generic number. For the end-to-end sending workflow once your ID is live, see how to send bulk SMS with your sender ID.
Registering a Sender ID in Nigeria
Nigeria also requires network-level registration of alphanumeric sender IDs, and Arkesel guides that submission from inside your account. The specific documents required, the approval timeline, and how the networks and regulator handle registration differ from Ghana’s process and can change over time, so confirm the current Nigeria requirements with the Arkesel team when you submit (subject to regulatory change). Build the approval step into your launch timeline rather than assuming an instant turnaround.
Short Code vs Long Code vs Dedicated Number vs Alphanumeric Sender ID
If you only send one-way messages — OTPs, alerts, confirmations — an alphanumeric sender ID is all you need. The moment you want customers to reply, you need a number they can text back. That’s where short codes, long codes, and dedicated numbers come in.
Here’s how the four options compare.
| Option | What it is | Two-way replies? | Registration | Best for |
|---|---|---|---|---|
| Alphanumeric sender ID | Your brand name (typically up to 11 characters) shown in place of a number | No — you can’t reply to a name | Registered per network, per country | One-way transactional and marketing SMS under your brand |
| Short code | A short, memorable number (typically four to six digits) | Yes | Provisioned and approved through a provider or operator | High-volume two-way campaigns, keyword opt-ins, voting |
| Dedicated long / virtual number | A standard-length number assigned to you | Yes | Provisioned through a provider | Two-way conversations without a short code |
| Shared long number | A standard number shared across senders | Limited, usually routed by keyword | Usually no dedicated registration | Low-volume reply handling |
Which should you choose?
- One-way only (OTPs, alerts, confirmations): an alphanumeric sender ID.
- Two-way at scale (keywords, opt-ins, voting): a short code.
- Two-way conversations without a short code: a dedicated long or virtual number.
Availability and lead times for short codes and dedicated numbers vary by country and by operator in both Ghana and Nigeria, so plan provisioning ahead of any launch that depends on inbound replies.
A note on handling replies with Arkesel: rather than a self-serve short-code product, Arkesel’s path for two-way conversations is KOVA IQ, which unifies SMS, WhatsApp, and social DMs into one inbox so your team sees and answers customer replies in one place. If you need a dedicated short code or number provisioned for Ghana or Nigeria, contact the Arkesel team to talk through options for your use case.
Ready to wire it up? Read the Arkesel developer documentation for the full SMS API endpoint reference, or contact the team to provision a sender ID or short code for Ghana or Nigeria.
Transactional SMS Use Cases for Developers
Transactional messaging — OTPs, alerts, and confirmations — is the highest-value SMS API integration pattern for developers in both markets. These messages are time-critical, tied directly to user actions, and generally exempt from DND restrictions.
OTP Verification
Two-factor authentication and signup verification. Your API generates a code, sends it via SMS, and verifies the user’s input against the original.
Key implementation details:
- Generate cryptographically random codes (six digits minimum)
- Set short expiry windows (five minutes or less)
- Rate-limit OTP requests per phone number to prevent abuse
- Never log OTP codes in plain text
For a detailed walkthrough, see our OTP API integration guide. If you’re evaluating OTP-specific providers, our OTP API provider comparison covers Africa-rated options.
Payment Confirmations
Mobile money and card payment confirmations. When a transaction completes, fire an SMS immediately — your user expects confirmation within seconds.
Order and Delivery Updates
E-commerce order status: placed, processing, shipped, delivered. Each state transition triggers a message. Keep messages under 160 characters (one SMS segment) to control costs.
Appointment Reminders
Healthcare, logistics, and service businesses. Schedule messages 24 hours and one hour before the appointment, and include a cancel or reschedule option. When customers reply to a reminder, route those replies into KOVA IQ so nothing gets missed.
For deeper integration with your CRM, see our SMS CRM integration guide.
Production Best Practices for SMS API Integration in Ghana and Nigeria
Shipping SMS in production across Ghana’s and Nigeria’s mobile networks requires attention to formatting, encoding, compliance, and resilience.
E.164 Phone Number Formatting
Always store and send numbers in E.164 format. Ghana numbers are +233 followed by the nine-digit subscriber number; Nigeria numbers are +234 followed by the ten-digit subscriber number. Strip leading zeros, spaces, and dashes before sending.
import re
def normalize_msisdn(number: str, country: str) -> str:
digits = re.sub(r"[^\d]", "", number)
if country == "GH":
if digits.startswith("233") and len(digits) == 12:
return f"+{digits}"
if digits.startswith("0") and len(digits) == 10:
return f"+233{digits[1:]}"
if country == "NG":
if digits.startswith("234") and len(digits) == 13:
return f"+{digits}"
if digits.startswith("0") and len(digits) == 11:
return f"+234{digits[1:]}"
raise ValueError(f"Invalid {country} number: {number}")Message Encoding: GSM-7 vs Unicode
GSM-7 encoding fits 160 characters per SMS segment. Unicode (for special characters, emojis, or non-Latin scripts) drops capacity to 70 characters per segment. Longer messages split into multiple segments, each billed separately.
Keep transactional messages in GSM-7 range. If you must use Unicode, calculate segment count before sending.
Rate Limiting and Throttling
Respect your provider’s rate limits. Most APIs return HTTP 429 when you exceed the threshold. Implement:
- A token-bucket or leaky-bucket algorithm for outgoing requests
- Exponential backoff on 429 responses
- Queue-based architecture for bulk sends (don’t fire 100,000 requests at once)
DND List Compliance in Ghana and Nigeria
Both Ghana and Nigeria operate Do-Not-Disturb controls at the network level, and the rules differ by market and change over time (subject to regulatory change). Before bulk marketing sends:
- Query your provider’s DND check endpoint, if available
- Filter DND-registered numbers out of marketing campaigns
- Handle DND rejection codes in your delivery webhook handler
- Keep a local suppression list updated from DND rejections
Transactional messages (OTPs, order confirmations) are generally exempt from DND restrictions, but confirm the current position for each market with your provider.
Failover Strategies
For mission-critical messages (OTPs, payment alerts), build a failover path:
- Primary route: your main SMS provider
- Secondary route: a backup provider activated after a primary timeout
- Tertiary route: voice OTP as a final fallback for critical authentication
Never rely on a single route for messages that block user actions.
Security: API Key Management
- Rotate API keys on a regular schedule
- Use separate keys for sandbox and production
- Never expose keys in client-side code or version control
- Restrict keys by IP address where your provider supports it
- Monitor API usage for anomalies — sudden spikes may indicate a compromised key
Frequently Asked Questions
How do I integrate the Arkesel SMS API?
Send a single authenticated HTTP POST to https://sms.arkesel.com/api/v2/sms/send. Put your API key in the api-key request header and pass the sender ID, message, and recipients in a JSON body with Content-Type: application/json. Arkesel provides copy-paste samples in cURL, Python, Node.js, and PHP; there are no official SDKs to install. The full reference is in the developer documentation.
How do I configure an SMS delivery callback (webhook) URL?
Expose a public HTTPS endpoint on your server and register it as your callback URL. The provider then POSTs a JSON payload to that URL each time a message’s status changes; your handler parses the status, updates your records, and returns HTTP 200. Make the handler idempotent, verify the callback’s authenticity, and confirm the exact payload fields against the live developer documentation.
Do I need to register a sender ID in Ghana?
Yes. Alphanumeric sender IDs in Ghana require registration at the carrier level. You submit your business details and preferred sender name from inside your Arkesel account, and approval often takes a few business days. Without a registered sender ID, messages may go out from a generic number.
Do I need to register a sender ID in Nigeria?
Yes. Nigeria also requires network-level registration of alphanumeric sender IDs, and Arkesel guides the submission from inside your account. The specific documents and approval timeline differ from Ghana’s and can change, so confirm the current Nigeria requirements when you submit (subject to regulatory change).
Short code vs sender ID vs dedicated number — which do I need?
Use an alphanumeric sender ID for one-way messages like OTPs and alerts. Use a short code for high-volume two-way campaigns with keyword replies, and a dedicated long or virtual number for two-way conversations without a short code. Availability and lead times vary by country and operator; for reply handling with Arkesel, conversations route into KOVA IQ.
How much does an SMS API cost in Ghana and Nigeria?
SMS API pricing is typically per-message with volume discounts, and it varies by provider, message type (transactional vs promotional), and volume tier. Keep an eye on sender-ID and dedicated-number fees when you compare. See current Arkesel pricing for how rates and tiers are published.
How do I handle DND-blocked numbers and delivery failures in Ghana and Nigeria?
Build delivery-webhook handling into your app and branch on the status. A network timeout suggests a retry with backoff; a DND rejection means the number opted out, so don’t retry; an invalid-number error means the format is wrong. For critical messages like OTPs, add a secondary provider as failover and voice OTP as a tertiary channel.
What is the difference between transactional and promotional SMS?
Transactional SMS (OTPs, payment confirmations, delivery updates) is triggered by a user action and is generally exempt from DND restrictions. Promotional SMS (marketing campaigns, offers) is bulk-sent to subscriber lists and must respect DND opt-out lists. Different pricing tiers may apply.
Start Building with a Bulk SMS API for Ghana and Nigeria
The gap between choosing a provider and shipping your first production SMS is smaller than you think. The fundamentals hold across both markets: direct carrier connections for reliable delivery, webhooks for real-time status, per-country sender-ID registration, and E.164 formatting for clean routing.
Arkesel’s SMS API gives you direct connections to Ghana’s three mobile networks and reach across Nigeria’s four, code samples in cURL, Python, Node.js, and PHP, and real-time delivery webhooks. One POST request. One header for auth. JSON in, SMS out.
Create your free Arkesel account, grab your API key, and send your first SMS in minutes. The developer documentation has the complete endpoint reference, and for the wider strategy around SMS in-market, see our complete SMS marketing guide for Ghana.






