Developers

Powerful SMS API. Clean docs.

Integrate bulk SMS into any application in minutes. RESTful JSON API with SDKs for PHP, Python, Node.js and more.

Quick Start

Send your first SMS in minutes

Choose your language and copy the example below. Your first message can be sent in under 10 minutes.

SrilankaBulkSMS API — Quick Start
// SrilankaBulkSMS PHP SDK Example
$apiKey   = 'your_api_key_here';
$endpoint = 'https://api.srilankabulksms.com/v1/send';

$response = file_get_contents($endpoint, false, stream_context_create([
    'http' => [
        'method'  => 'POST',
        'header'  => "Authorization: Bearer {$apiKey}\r\n" .
                     "Content-Type: application/json\r\n",
        'content' => json_encode([
            'to'      => '+94771234567',
            'from'    => 'MYCOMPANY',
            'message' => 'Your OTP is 482910. Valid for 5 minutes.',
        ]),
    ],
]));

$result = json_decode($response, true);
echo "Message ID: " . $result['message_id'];
echo "Status: "     . $result['status'];
# SrilankaBulkSMS Python Example
import requests

API_KEY  = 'your_api_key_here'
ENDPOINT = 'https://api.srilankabulksms.com/v1/send'

response = requests.post(
    ENDPOINT,
    headers={
        'Authorization': f'Bearer {API_KEY}',
        'Content-Type':  'application/json',
    },
    json={
        'to':      '+94771234567',
        'from':    'MYCOMPANY',
        'message': 'Your OTP is 482910. Valid for 5 minutes.',
    }
)

data = response.json()
print(f"Message ID: {data['message_id']}")
print(f"Status:     {data['status']}")
curl -X POST https://api.srilankabulksms.com/v1/send \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "to":      "+94771234567",
    "from":    "MYCOMPANY",
    "message": "Your OTP is 482910. Valid for 5 minutes."
  }'
API Reference

REST API Endpoints

All endpoints are relative to the base URL: https://api.srilankabulksms.com

POST
/v1/send
Send a single SMS message to one recipient
POST
/v1/send-bulk
Send SMS to multiple recipients in one request
GET
/v1/status/{id}
Check the delivery status of a sent message
GET
/v1/balance
Retrieve your current SMS credit balance
POST
/v1/contacts
Create and manage contact lists for campaigns
GET
/v1/reports
Download delivery reports and campaign analytics
Authentication

Bearer token authentication

All API requests must include your API key as a Bearer token in the Authorization header.

Include your API key in every request using the standard HTTP Authorization header:

Authorization Header
Authorization: Bearer your_api_key_here

To get your API key, log in to portal.srilankabulksms.com, navigate to Settings > API Keys, and click Generate. You can create multiple keys for different projects and rotate them at any time without service interruption.

View Full Documentation →
Features

Everything developers need

Built for reliability, built for scale.

REST / JSON
Standard HTTP verbs, JSON request and response bodies. Works with any language or framework.
Webhooks & Callbacks
Real-time delivery status pushed to your URL. No polling required.
Official SDKs
Pre-built libraries for PHP, Python, Node.js, Ruby, and Java to get you started instantly.
Sandbox Environment
Full test environment with simulated responses. Build and test without consuming real credits.
99.9% API Uptime
SLA-backed API availability. Redundant infrastructure ensures your integration never goes down.
Global Coverage
Send to Sri Lanka and 160+ countries via the same API. No separate integrations needed.
Ready to integrate?
Start with 50 free credits. No credit card required.
Instant activation · 99.9% uptime SLA · Full API access