AVC SMS

SMS gateway API for Sri Lanka.
One request to send.

Connect your website, app, POS or ERP to every Sri Lankan mobile network. A plain REST API with JSON replies, bearer-key authentication and delivery webhooks, at the same per-message price as the portal.

1 requestto send one SMS or 10,000
120 / minuterequests per API key
Rs. 0.60lowest rate per SMS
Rs. 0API or setup fee
Quick start

Send your first SMS from code.

Create an account, copy your API key from the Developer / API page and run one of these. The reply gives the cost, the part count and an ID for every message.

# one request, any number of recipients
curl -X POST https://avcsms.lk/api/v1/sms/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "0771234567", "message": "Your OTP is 482913", "sender_id": "MYSHOP"}'
201 Created { "status": "success", "data": { "campaign_id": 120, "accepted": 1, "segments": 1, "messages": [ { "id": 9001, "to": "94771234567", "status": "sent" } ] } }
  • One API key per account, shown in the portal. Restrict it to your server IPs or reset it at any time.
  • The final delivery status is pushed to your webhook, per account or per request.
  • 120 requests a minute per key. Small sends reach the network before we reply.
Read the SMS API reference
What the API does

Everything in the portal, as JSON.

The API sends through the same account, balance and sender IDs as the web portal.

  • Send to one number or 10,000Pass one number, a list, or name-and-number pairs for personalised messages. Local formats such as 0771234567 and +94771234567 are both accepted.
  • Schedule from codeAdd schedule_at with a date and time in Sri Lanka time and the message goes out then.
  • Delivery webhooksWhen a message reaches its final state we POST the result to your URL, set once for the account or per request with callback_url.
  • Count before you sendThe count endpoint returns the encoding, parts and cost of a message, so your app can show the price first.
  • Balance and sender IDsRead your balance, rate and approved sender IDs to keep your own dashboards and alerts up to date.
Built for production

Keys you control. Replies you can rely on.

The details that matter once real customers depend on your messages.

  • Lock a key to your serversRestrict your API key to your server IP addresses, and reset it in one click if it ever leaks.
  • Fast hand-offSmall sends are passed to the network before the API replies, so an OTP is already on its way when you get the answer.
  • Your own referenceAttach an order or session reference to a send. It comes back in status replies and webhooks, so matching is easy.
  • Refunds without ticketsMessages the network refuses are refunded automatically and reported with a clear status.
  • Simple GET for older toolsSystems that can only call a web address can send with a single GET request.
Use cases

What developers build with an SMS gateway.

If your software knows a phone number and something worth saying, it can send an SMS.

Login and sign-up codes

Verify phone numbers and protect sign-ins with one-time passwords.

Order and payment updates

Confirm orders, payments and dispatches from your online store or POS.

Reminders

Appointment, renewal and due-date reminders scheduled straight from your database.

System alerts

Tell your team when a server, a sensor or a stock level needs attention.

School and member systems

Send attendance, results and notices from the software you already run.

Billing and ERP

Send invoice and receipt notices at the moment they are created.

API pricing

The API is free. You pay per message.

API messages cost the same as portal messages. All taxes are included and credit never expires.

Up to 999 SMS / month Rs. 0.79 / SMS Starter rate
1,000 – 2,999 SMS / month Rs. 0.74 / SMS Save 6% vs. starter
3,000 – 6,999 SMS / month Rs. 0.69 / SMS Save 13% vs. starter
7,000 – 14,999 SMS / month Rs. 0.64 / SMS Save 19% vs. starter

Full pricing and top-up packages

FAQ

Questions about the SMS gateway API.

Something else? Talk to us or call 070 186 3408.

How do I get an SMS API key?
Create an account and open the Developer / API page in the portal. Your key is shown there, and you can copy it, restrict it to your server IP addresses or reset it at any time.
Is there a free trial for the SMS API?
New accounts start with 10 free SMS, enough to test your integration from end to end before you top up.
Which programming languages can I use?
Any language that can make an HTTPS request. The API reference has copy-and-paste examples for cURL, PHP, JavaScript and Python.
What are the rate limits?
Each API key can make 120 requests a minute, and one request can carry up to 10,000 recipients.
Does the API cost more than the portal?
No. API messages are billed at the same rate per part as messages sent from the portal, and there is no API or setup fee.
How do I receive delivery reports?
Set a webhook URL in the portal or pass callback_url with a send. We POST the final status of each message to it, and you can also ask for the status of any message by its ID.
Can I send Sinhala and Tamil through the API?
Yes. Send the text as UTF-8. Sinhala and Tamil are detected automatically and sent as Unicode, with 70 characters per part.

More from AVC SMS

Get your API key.

Create an account, copy the key and send your first message in minutes.