Build, scale, and manage your bulk SMS campaigns using our secure RESTful endpoints.
Overview of the AlieSMS API and its metadata.
AlieSMS provides a secure, fast, and scalable RESTful API to integrate bulk SMS capabilities into your applications. The API allows businesses and platforms to initiate message dispatch, check wallet balances, and manage queues.
To use the API, you must first:
https://developer.aliesms.com
All requests made to the AlieSMS API must accept and send JSON. Ensure you include the following headers in your HTTP requests (in addition to your Authorization header later on):
Content-Type: application/json
Accept: application/json
To access our API, you must first create an account. You will use your account credentials—email and password—to generate a token.
Endpoint: POST /api/token/generate.php
{
"email": "example@email.com",
"password": "Pass123#@26"
}
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
email |
string | Registered account email address | "example@email.com" | |
password |
string | Account password | "Pass123#@26" |
{
"status": "OK",
"token": "x7K9vM3bL5pR1nQ8wP4jH2tZ6cDyF0nVb"
}
Retrieve the current wallet balance for your account.
Endpoint: GET /api/user/balance.php
{
"status": "Success",
"balance": 15000,
"currency": "UGX"
}
Queue messages for dispatch. The system automatically calculates cost based on SMS segments and content encoding (GSM vs Unicode/Emoji).
Endpoint: POST /api/message/batch/create.php
{
"batch_name": "Campaign 001",
"message_text": "Hello, this is a test! 😊",
"recipients": "0701234567, 0771234567"
}
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
batch_name |
string | Name to identify the campaign | "Campaign 001" | |
message_text |
string | Content of the SMS message | "Hello, this is a test! 😊" | |
recipients |
string | The recipient's phone number or a Comma-separated list of phone numbers | "0741234567" OR "0701234567, 0771234567" |
{
"status": "OK",
"message": "Messages successfully queued.",
"smsCount": 1
"total_recipients": 2
"MTN": 1
"AIRTEL": 1
"duplicates_removed": 0
"invalid_numbers": []
}
Fetch all messages currently in your personal queue (status = "Pending") waiting to be sent.
Endpoint: GET /api/message/request.php
{
"status": "OK",
"message": "null",
"details": [
{
"messageID": "123",
"messageText": "Hello, this is a test! 😊",
"phoneNumber": "0701234567"
"smsCount": "1"
"provider": "AIRTEL"
},
{
"messageID": "124",
"messageText": "Hello, this is a test! 😊",
"phoneNumber": "0771234567"
"smsCount": "1"
"provider": "MTN"
}
]
}
Cancel a pending message by marking it as Deleted. Only messages with a status of 'Pending' can be Delete.
Endpoint: POST /api/message/delivery/report.php
{
"message_id": "123",
"status": "Delete"
}
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
message_id |
string | Unique ID of the message to delete | "123" | |
status |
string | Must be set to "Delete" | "Delete" |
{
"status": "Success",
"message": "Message 123 Deleted successfully"
}