Skip to content

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.

PropertyValue
EndpointSend SMS
MethodPOST
URL/api/v1/sms/send
AuthenticationBearer Token

Request Headers:

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer your-auth-tokenYes

Request Body:

json
{
    "isp_id": 1,
    "branch_id": 1,
    "user_id": 1,
    "phone": "01712345678",
    "message": "Your bill is due. Please pay soon."
}
ParameterTypeRequiredDescription
phonestringYesRecipient phone number
messagestringYesSMS 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.

PropertyValue
EndpointSend SMS to Subscriber
MethodPOST
URL/api/v1/sms/send-to-subscriber
AuthenticationBearer Token

Request Body:

json
{
    "isp_id": 1,
    "branch_id": 1,
    "user_id": 1,
    "subscriber_id": 1,
    "message": "Your package expires tomorrow."
}
ParameterTypeRequiredDescription
subscriber_idintegerYesSubscriber ID
messagestringYesSMS message content

Success Response (200 OK):

json
{
    "success": true,
    "message": "SMS sent successfully"
}

Send Bulk SMS

Send SMS to multiple subscribers at once.

PropertyValue
EndpointSend Bulk SMS
MethodPOST
URL/api/v1/sms/send-bulk
AuthenticationBearer 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."
}
ParameterTypeRequiredDescription
subscriber_idsarrayYesArray of subscriber IDs
messagestringYesSMS message content

Success Response (200 OK):

json
{
    "success": true,
    "message": "Bulk SMS sent successfully",
    "data": {
        "total": 5,
        "sent": 5,
        "failed": 0
    }
}

www.onezeroart.com