SMS Status API
GET Method
Description
Using this API you will be able to request message status.
Base URL
<https://api.kaleyra.io/v1/><SID>
To get SMS status, follow the below steps:
- Signup or Login to Kaleyra.io and create your API key.
Refer to the Create an API Key page for steps to create your API key. To view the API Key and the SID, see View API Key and SID.
Note:
After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in Kaleyra.io.
- API command to get SMS Status
Use the following command:
Request Format
To get SMS status, use the /messages endpoints.
curl -X GET "https://api.kaleyra.io/v1/<SID>/messages/status?message_ids=<MESSAGE_IDS>" \
-H "api-key: <API_KEY>"
Note:
Ensure to replace the parameter values with the proper inputs in the above code.
Parameters and Variables
Below is the list of parameters and variables used:
Parameter | Variable | Description | Example | Mandatory |
---|---|---|---|---|
SID | String | Account SID (Security Identifier) | HXXXXXXX071US | True |
MESSAGE_IDS | String | Message ID that was generated by Kaleyra.io send sms api | ee8aXXXX-XXXX-XXXX-XXXX-9b717XXXX30d:1, ee8aXXXX-XXXX-XXXX-XXXX-9b717XXXX30d:2 | True |
API_KEY | String | API Key generated by Kaleyra.io | Ac4XXXXX21f | True |
- Response Format
This section provides you the success and failure JSON response format for different scenarios.
Success Response
{
"data": [
{
"campaign_id": "507XXXX-XXX-XXXX-XXXX-b8f6b452c04a:1",
"status": "Delivered",
"status_details": "DELIVERED"
}
],
"error": {}
}
Note:
In case of an error, ensure that the parameter values are correct in the above code. Refer to the SMS Status and Status Trace Codes page for detailed information.
Sample Request
curl -X GET "https://api.kaleyra.io/v1/HXXXXXXX071US/messages/status?message_ids=<MESSAGE_IDS>" \
-H "api-key: Ac4XXXXX21f"
Updated 11 months ago