GET / sms/status
Base URL: https://backend.easify.app/api/v2
This endpoint is used to fetch the SMS status.
The user can fetch the SMS status using the sms_id, which is provided in the Send SMS API response.
There is a rate limit of 60 requests per minute. If you exceed this limit, you will receive a 429 Too Many Requests status, along with a message indicating when you can try again.
Authentication
The Easify API token used for authentication is passed in the header as a Bearer token, which can be obtained from the easify app under Settings > API Settings.
Headers
Authorization string required Bearer << YOUR_EASIFY_API_TOKEN_HERE >>
Query Parameters
sms_id string | sms_id is provided in the send-sms API response | Required |
Sample Params and Success Response:
Params:
{
"sms_id": "3315**"
}
Success Response:
{
"status": true,
"message": "SMS status successfully fetched",
"data": {
"status": "Delivered",
"remarks": ""
}
}
SMS Status
Status | Description |
---|---|
Pending | The SMS message is in the queue to be sent |
Delivered | The SMS message has been successfully delivered to the recipient. |
Undelivered | The SMS message could not be delivered to the recipient. This could be due to various reasons such as an invalid phone number or network issue. |
Failed | The SMS message delivery attempt failed. This could be due to a technical issue on the service provider's end |
Success | The SMS message has been successfully sent to the recipient |
Scheduled | If you are sending an SMS during a restricted time, it will be scheduled for the next available time. |
Api Response Status
Case | Status Code | Response |
---|---|---|
If the user does not provide a token in the header or provides an invalid token | 401 |
{
"status":false,
"message":"Unauthenticated",
"errors":[]
}
|
If user not provided sms_id | 422 |
{
"message":"The sms id field is required.",
"errors": {
"sms_id": ["The sms id field is required."]
}
}
|
If user provided invalid sms_id | 400 |
{
"status":false"
message":"Failed to fetch SMS Status, please check your SMS ID!",
"errors": []
}
|
If the user exceeds the allowed rate limit for requests | 429 |
{
"status":false,
"message":"Too many requests. Try again in 59 seconds",
"errors":[]
}
|
If the user's subscription has ended | 402 |
{
"status":false,"message":"You need to recharge your account to proceed","errors":[]
}
|
If the user does not have an enterprise plan | 403 |
{
"status": false,
"message": "Access denied. Your current plan does not allow access to this feature. Please upgrade to the Enterprise plan.",
"errors": []
}
|
PHP-cURL
php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://backend.easify.app/api/v2/sms/status?sms_id=331****',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <> '
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;