SMS API Documentation

SMS API Overview

SMSWay.LK SMS API allows applications to send and receive SMS messages globally through a secure REST API. Each message is assigned a unique random ID that can be used to track delivery status and message details.

API Base Endpoint

https://app.smsway.lk/api/http/sms/send

This endpoint supports both POST (JSON) and GET requests.

Authentication & Headers

All requests must include a valid API token generated from the Developer section of the SMSWay.LK dashboard.

Required headers: Accept: application/json
Content-Type: application/json

Parameters Required to Send SMS

api_token – API token generated from the developer dashboard
recipient – Destination mobile number with country code (use commas for multiple numbers)
sender_id – Sender name or phone number (maximum 11 characters for alphanumeric sender ID)
type – Message type (use plain for normal text messages)
message – Content of the SMS message


Optional parameters:
schedule_time – Scheduled delivery date and time in YYYY-MM-DD HH:MM format
dlt_template_id – Registered DLT content template ID (if applicable)

Sending a Single SMS (POST Request)

curl -X POST https://app.smsway.lk/api/http/sms/send
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{
"api_token":"YOUR_API_TOKEN",
"recipient":"94761234567",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'

Sending SMS Using GET Method

https://app.smsway.lk/api/http/sms/send?recipient=94761234567&sender_id=YourName&message=Test&api_token=YOUR_API_TOKEN

Sending SMS to Multiple Recipients

Multiple mobile numbers can be sent in a single request by separating numbers with commas.

Example format:
94761234567,947517214579

Scheduling SMS Messages

SMS messages can be scheduled for future delivery using the schedule_time parameter.

Example format:
2025-12-20 07:00

API Success Response

{
"status": "success",
"data": "sms reports with all details"
}

API Error Response

{
"status": "error",
"message": "A human-readable description of the error."
}

Viewing a Single SMS Message

Each SMS message is assigned a unique UID upon creation.
This UID can be used to retrieve message details.

Endpoint:
https://app.smsway.lk/api/http/sms/view/{uid}

Example:

curl -X GET https://app.smsway.lk/api/http/sms/view/606812e63f78b
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{"api_token":"YOUR_API_TOKEN"}'

Viewing All SMS Messages

All sent and received SMS messages can be retrieved with pagination support.

Endpoint:
https://app.smsway.lk/api/http/sms

Get in touch!

Prefer to write? Fill out the form below and we'll get back to you within 24 hours.

Address

Illavali North Jaffna, Sri Lanka