REST API v1 Documentation
Base URL: https://sms.massej.li/api/v1/
All API requests require authentication using your API key. Include it in the request headers:
Or use the Authorization header:
You can find your API key in your Profile Settings.
API requests are limited to 100 requests per minute per API key. If you exceed this limit, you'll receive a 429 Too Many Requests response.
Send an SMS to a single recipient.
| Parameter | Type | Description |
|---|---|---|
to required |
string | Recipient phone number (international format) |
message required |
string | Message content |
sender_id optional |
string | Sender ID (max 11 chars). Default: "SMS" |
message_type optional |
integer | 1=English, 2=Unicode, 4=Arabic. Default: 1 |
schedule_time optional |
string | Schedule time (Y-m-d H:i:s format) |
Send the same SMS to multiple recipients (max 1000).
| Parameter | Type | Description |
|---|---|---|
recipients required |
array | Array of phone numbers |
message required |
string | Message content |
sender_id optional |
string | Sender ID (max 11 chars) |
Get your current account balance.
Get your SMS sending history.
| Parameter | Type | Description |
|---|---|---|
page |
integer | Page number (default: 1) |
per_page |
integer | Items per page (1-100, default: 20) |
status |
string | Filter by status: delivered, sent, pending, failed |
date_from |
string | Start date (Y-m-d format) |
date_to |
string | End date (Y-m-d format) |
Get SMS pricing for all supported countries.
Calculate cost before sending without actually sending the message.
| Parameter | Type | Description |
|---|---|---|
recipients |
array | Array of phone numbers |
to |
string | Single phone number (alternative to recipients) |
message required |
string | Message content |
Get your account information and statistics.
All errors return a JSON response with the following structure:
| Code | Description |
|---|---|
200 |
Success |
201 |
Created successfully |
400 |
Bad request - Invalid parameters |
401 |
Unauthorized - Invalid or missing API key |
403 |
Forbidden - Account not active |
404 |
Not found |
429 |
Rate limit exceeded |
500 |
Internal server error |