SMS API in المغرب
Add SMS to your application in Morocco in minutes. The eSMS Africa SMS API delivers to Maroc Telecom, Orange & Inwi over direct routes, with delivery webhooks, OTP, sender IDs and a free sandbox to test before you go live.
SMS API in Morocco, done properly
REST API + SMPP
Send with a simple HTTPS request or bind over SMPP for high throughput. Either way your Morocco traffic runs on the same direct routes to Maroc Telecom, Orange, Inwi.
Delivery webhooks (DLR)
Get a real-time callback for every message status - sent, delivered, failed - so your app always knows what happened to each SMS in Morocco.
Sandbox + SDKs
Test free in the sandbox, then go live with official Node, Python, PHP and Go SDKs. Example numbers for Morocco use the +212 country code.
Sender IDs & OTP
Register a branded sender ID for Morocco and send OTPs with sub-second delivery through the same API.
How to send an SMS to Morocco with the API
- 1 Get your API key. Create an account and copy your API key from the dashboard.
- 2 Format the number. Use international format for Morocco numbers - they start with +212 (e.g. 212612345678).
- 3 Call the send endpoint. POST to https://api.esmsafrica.io/v1/sms/send with to, from and message.
- 4 Receive delivery reports. Set a webhook URL and eSMS Africa calls it with each message status in real time.
- 5 Go live. Test in the sandbox with a test key, then switch to your live key.
Send your first SMS to Morocco
curl -X POST https://api.esmsafrica.io/v1/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "212612345678",
"from": "MyBrand",
"message": "Your message"
}'Full REST reference, SMPP details and SDKs for Node, Python, PHP and Go in the API documentation.
SMS API pricing in Morocco
Prices reflect live rates for Morocco. See the full pricing page or contact sales for volume rates.
SMS API in Morocco: common questions
How do I send an SMS to Morocco from my app?
POST to the eSMS Africa /sms/send endpoint with the recipient in international format (+212...) and your message. See the code samples on this page for curl, Node, Python and PHP.
Do you support delivery reports over the API?
Yes. Set a webhook URL and eSMS Africa calls it with the delivery status of every message to Morocco in real time.
REST or SMPP for Morocco?
Use REST for most applications; use SMPP when you need very high, sustained throughput. Both reach Maroc Telecom, Orange & Inwi on direct routes.
Is there a sandbox?
Yes - a free sandbox and test API keys let you integrate and test SMS to Morocco without spending credit.
Which SDKs are available?
Official SDKs for Node.js, Python, PHP and Go, plus a documented REST API you can call from any language.
More SMS solutions in Morocco
More ways to reach Morocco
SMS منبر
Bulk SMS, an SMS API and OTP to every African mobile network on direct routes.
eSMS Verify
Managed phone verification and OTP - generate, send, rate-limit and check codes in two API calls.
Two-Way SMS
Dedicated or shared short codes to send and receive SMS, with signed webhooks and replies from your code.
SMPP Gateway
High-throughput A2P SMS over direct SMPP binds with guaranteed TPS and DLRs.
eSMS Mail
Transactional and marketing email with a modern API, delivery reports and analytics.
eSMS Links
Branded short links, QR codes and click analytics for your campaigns.
eSMS Chat
AI plus human customer-support chat you can add to any website.
eSMS Workspace
The desktop app that brings Email, SMS and SMPP into one place.
SMS API in Morocco, done right.
Direct routes to Maroc Telecom, Orange & Inwi, delivery reports and local support. Create a free account and start today.