Skip to content

SMS API for developers in Nepal

The SMS API is a REST interface that takes JSON and an API key in a header. One request can carry up to 1,000 recipients, you can make 120 requests a minute, and signed webhooks report each delivery. Use it for OTP, alerts or bulk sends from your own system.

What does a send request look like?

A send is one POST with a JSON body listing up to 1,000 recipients and the message, your API key in a header and an idempotency key for safe retries. It returns 202 with a batch id and the cost. The request below is illustrative; your account's API reference gives the exact base URL, path and header names.

curl -X POST "$API_BASE_URL/messages" \
  -H "Content-Type: application/json" \
  -H "<api-key-header>: $API_KEY" \
  -H "Idempotency-Key: order-1042-otp-1" \
  -d '{
    "to": ["98XXXXXXXX"],
    "message": "Your login code is 482913. It expires in 5 minutes."
  }'

# 202 Accepted
# { "batchId": "...", "cost": 1 }

How does the SMS API send a message?

Your server posts the recipients and message to the send endpoint with your API key. The API validates the request, reserves credits, and returns 202 Accepted with a batch id and the cost. Sending then happens in the background, and each message moves through queued, sent and delivered or failed.

What limits apply to the SMS API?

Each request can include up to 1,000 recipients, and an account can make up to 120 requests a minute. Recipients are 10-digit Nepali mobile numbers; +977 or 977 prefixes are normalized. A message can be up to 2,000 characters and is billed by segment.

How do delivery webhooks work?

Give a callback URL and the API posts to it when a message is delivered or fails. Each webhook is signed with HMAC-SHA256 using a secret for your account, so your server can check it came from us. A failed webhook is retried, up to 3 attempts in total.

How do I keep the API key safe?

Keep it on your server and call the API from there. Never ship the key in browser code or a mobile app. Keys can be scoped, for example to send only, so a leaked key cannot read your contacts or account. Rotate a key straight away if you suspect it leaked.

Questions people also ask

Can I retry a request without double sending?

Yes. Send an Idempotency-Key header. A retry with the same key returns the original result instead of sending again.

Can I send to a saved contact list through the API?

Yes. Contact lists saved in the dashboard can be used as recipients, so your system does not need to hold every number.

Where is the full API reference?

You receive the API base URL and full reference with your account, after KYC approval.

Send your first message

Tell us what you plan to send. We set up your account, KYC and sender ID with you. Approval adds 10 free SMS credits for organizations, 5 for personal accounts.

Get started