SMS API for Developers | MozOut

Your first SMS in minutes

Start with a Sandbox key, which validates requests without sending anything or using credits. When you are ready, switch to the Production key.

  1. Create a sandbox_ key in the API Center in My MozOut, with the sms:write permission.
  2. Send a POST /v1/sms/messages request with the number and the text.
  3. Go live with the prod_ key. The request stays the same.
curl https://api.mozout.com/v1/sms/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-4521-ready" \
  -d '{"number": "+258841234567",
       "text": "Your order 4521 is ready for pickup."}'

From your system to the customer's phone

One HTTPS request is enough. The API validates it, deducts the credits and hands the message to the operators; your system follows its status.

  1. Your system

    An order, an invoice or a booking triggers the request.

  2. Our API

    Checks the key, the number and the balance, and replies in JSON.

  3. The operators

    The message goes out with your Sender ID or with NETMSG.

  4. The customer

    Gets the SMS in Mozambique and Angola, on any phone.

The statuses of a message:

  • scheduled
  • queued
  • sending
  • sent
  • failed
  • cancelled
  • simulated

26 operations, grouped by area

They all start at https://api.mozout.com, with the key in the Authorization: Bearer header. The full list, with fields and responses, is in the documentation.

  • Messages

    • POST/v1/sms/messages
    • GET/v1/sms/messages
    • GET/v1/sms/messages/{id}
    • POST/v1/sms/messages/{id}/cancel
  • Account

    • GET/v1/sms/balance
    • GET/v1/sms/stats
  • Templates

    • GET/v1/sms/templates
    • POST/v1/sms/templates
    • GET/v1/sms/templates/{id}
    • PATCH/v1/sms/templates/{id}
    • DELETE/v1/sms/templates/{id}
  • Contacts and groups

    • GET/v1/sms/contacts
    • POST/v1/sms/contacts
    • PATCH/v1/sms/contacts/{id}
    • GET/v1/sms/groups
    • POST/v1/sms/groups
    • DELETE/v1/sms/groups/{id}
  • Senders

    • GET/v1/sms/senders
    • POST/v1/sms/senders
    • GET/v1/sms/senders/{sender}
  • Opt-outs and verification

    • GET/v1/sms/opt-outs
    • POST/v1/sms/opt-outs
    • POST/v1/sms/otp
    • POST/v1/sms/otp/{id}/verify

Automatic SMS for your business

When something happens in your system, the customer gets an SMS right away. Nobody has to remember to let them know.

Sandbox or Production: click to compare

Both keys use the same address and the same operations. The difference is what happens when you send.

Key prefix
sandbox_
Is the SMS sent?
No: the request is validated and the full response comes back, with simulated: true.
Credits
None are used.
X-API-Mode header
sandbox
What it is for
Building and testing without risk.

Secure keys, rules that fit you

Each key has its own permissions and can be revoked at any time. Requests always go over HTTPS.

  • Separate permissions

    sms:read to read and sms:write to send and change.

  • IP allow list

    Optional: the key only works from the addresses you list.

  • Expiry and revocation

    30, 90 or 365 days, or no expiry. Revoke it whenever you like.

  • Safe retries

    With Idempotency-Key, a repeated request never sends twice.

  • Visible limits

    90 requests per minute per key and 300 per account, shown in the X-RateLimit headers.

  • Masked numbers

    Responses show the number as 25884****567, so it stays out of your logs.

SMS prices, no bundles

SMS sent through the API use the same credit balance as the SMS Center. The tier price applies to the whole quantity you buy.

  • Up to 1,000$0.0167
  • 1,001 to 5,000$0.0150
  • 5,001 to 10,000$0.0142
  • 10,001 to 25,000$0.0125
  • 25,001 to 50,000$0.0117
  • 50,001 to 100,000$0.0100
  • Over 100,000$0.0092

Minimum of 1,000 credits. 1 SMS of up to 160 characters = 1 credit. Sender ID: USD 50 per name and per country.

F.A.Q SMS API

MozOut

The most frequent questions about sending SMS through the API

An account with SMS activated, SMS credits and an API key with the sms:write permission. You create the key in the API Center in My MozOut. To test, a Sandbox key is enough, with no credits.

The send response already includes the status: sent, queued or failed. Later, call GET /v1/sms/messages/{id} or check the history. The possible statuses are scheduled, queued, sending, sent, simulated, failed and cancelled.

Yes. Put an approved Sender ID in the sender field. You can request one through the API or in My MozOut: it costs USD 50 per name and per country, and the review takes up to 48 business hours. Without sender, the free NETMSG is used.

No. Named senders, including NETMSG, cannot receive replies. If you need customers to contact you, include a phone number, an email or your website address in the message.

Any language that can make HTTPS requests: PHP, Python, JavaScript, Java, C# and more. The documentation has examples in cURL, PHP, Python and JavaScript, plus a Playground to try things out.

It is a value of your choice that you send in the request header. If the connection drops and your system repeats the same request with the same value, the API returns the first response and the SMS is not sent twice.

Up to 90 requests per minute per key and 300 per account, across all keys. The X-RateLimit-Limit and X-RateLimit-Remaining headers show how many are left. If you go over, the API answers 429 with the time to wait.

They come out of the same credit balance as the SMS Center. Each SMS part uses one credit: up to 160 characters is one part, or up to 70 with letters such as ã or ç. For a scheduled send, credits are only taken when the message goes out.

Lightning OFFER

Web Hosting + FREE Domain **

:
:
:
Stay Online!
keyboard_arrow_up Drag Up
Logo MozOut

Premium OFFER

Web Hosting + FREE Domain **

Offer ends in:
:
:
:
Stay Online!
Close