An order ready to collect.
Your system triggers an update when an order changes state.
Illustrative messageYour order is ready for collection.
SMS API · Morocco
Send your application-generated OTPs, alerts and notifications to Moroccan recipients. An HTTPS API, individual message tracking and signed webhooks.
Included in Essentiel and Croissance. API sending uses your account allowance and requires an active plan.
curl 'https://smsmarocpro.com/v1/messages' \
--header 'Authorization: Bearer <YOUR_SERVER_KEY>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: order_2026_000001_ready' \
--data '{
"to": "+2126XXXXXXXX",
"trafficClass": "transactional",
"text": "Your order is ready."
}'Request accepted. Keep its identifier to track the outcome.
Illustrative example only: this page sends no SMS. Replace masked values in your own server integration.
From your event to the outcome
Each message keeps its identifier. An HTTP response and receipt on the recipient's phone are different events.
Create a business operation and persist its idempotency key before the request.
Idempotency-KeyHTTP 202 confirms admission. A valid replay of the same request returns the same message.
GET /v1/messages/{id}Verify the signature and deduplicate events. Confirmed receipt remains distinct from transmission.
message.sent / message.deliveredInside your product
Your application chooses the recipient, content and timing. SMSMarocPro provides SMS transport and status tracking.
Your system triggers an update when an order changes state.
Illustrative messageYour order is ready for collection.
Your application calculates when to send and handles changes and cancellations.
Illustrative messageReminder: your appointment is tomorrow at 10 am.
You generate, expire and verify your codes. SMSMarocPro transports their SMS messages.
Illustrative messageYour verification code: [code generated by your application].
A controlled integration
Protect credentials and keep retries understandable when your application encounters an unexpected result.
Read the retry guide →Create a key with the required permissions. Keep secrets out of browsers, URLs and logs.
After an uncertain response, reuse the original key and content. A new key represents a new request.
Check the signature against the raw body, store the event durably and respond promptly. The guide covers retries and secret rotation.
Check availability, allowance and daily maximum. HTTP 202 does not promise immediate transmission or receipt.
For your developer
The public contract, examples and integration rules are available without an account. Choose the reference that fits your next step.
Prepare your integration
Create an account to explore credentials and choose your plan. API sending uses the resources of your active subscription.