Skip to content
MZSMS

Getting started

Quick start

Send your first SMS through the API in five minutes.

1. Create an account and add balance#

Register, verify your email, then add balance in Dashboard → Wallet. Every message is charged from your wallet, so a send with zero balance returns INSUFFICIENT_BALANCE.

2. Create an API key#

Go to Dashboard → API → Create key. Select the sms:send and messages:read scopes. Copy the key immediately: it is shown only once. Store it as an environment variable, for example MZSMS_API_KEY.

Keep keys on your server

Never embed an API key in a mobile app, browser JavaScript or a public repository. Anyone with the key can send messages billed to your account.

3. Send a message#

Replace the number with your own mobile number for the first test.

curl -X POST https://sms.marketian.net/api/v1/sms/send \
  -H "Authorization: Bearer $MZSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-10234-otp" \
  -d '{
    "to": "+8801XXXXXXXXX",
    "message": "Your verification code is 123456",
    "sender_id": "YOURBRAND",
    "type": "transactional"
  }'

A 202 Accepted response means the message is queued and charged. It is dispatched to the provider within seconds.

4. Check the delivery status#

curl https://sms.marketian.net/api/v1/messages/5b0f2c7e-7a55-4b1e-9d0a-3c1d2e4f6a70 \
  -H "Authorization: Bearer $MZSMS_API_KEY"

Next steps#