Appearance
User - SMS
Base URL:
https://your-domain.com
Admin endpoints for sending SMS messages. All endpoints require admin/staff authentication.
Send SMS
Send SMS to a specific phone number.
| Property | Value |
|---|---|
| Endpoint | Send SMS |
| Method | POST |
| URL | /api/v1/sms/send |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"phone": "01712345678",
"message": "Your bill is due. Please pay soon."
}| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Recipient phone number |
message | string | Yes | SMS message content |
Success Response (200 OK):
json
{
"success": true,
"message": "SMS sent successfully",
"data": {
"message_id": "MSG123456"
}
}Error Response (400 Bad Request):
json
{
"success": false,
"message": "SMS sending failed: Invalid phone number"
}Send SMS to Subscriber
Send SMS to a subscriber using their registered phone number.
| Property | Value |
|---|---|
| Endpoint | Send SMS to Subscriber |
| Method | POST |
| URL | /api/v1/sms/send-to-subscriber |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"subscriber_id": 1,
"message": "Your package expires tomorrow."
}| Parameter | Type | Required | Description |
|---|---|---|---|
subscriber_id | integer | Yes | Subscriber ID |
message | string | Yes | SMS message content |
Success Response (200 OK):
json
{
"success": true,
"message": "SMS sent successfully"
}Send Bulk SMS
Send SMS to multiple subscribers at once.
| Property | Value |
|---|---|
| Endpoint | Send Bulk SMS |
| Method | POST |
| URL | /api/v1/sms/send-bulk |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"subscriber_ids": [1, 2, 3, 4, 5],
"message": "Important notice: Scheduled maintenance tonight."
}| Parameter | Type | Required | Description |
|---|---|---|---|
subscriber_ids | array | Yes | Array of subscriber IDs |
message | string | Yes | SMS message content |
Success Response (200 OK):
json
{
"success": true,
"message": "Bulk SMS sent successfully",
"data": {
"total": 5,
"sent": 5,
"failed": 0
}
}