Transactional SMS Analytics details will be listed for a given time period as you send a request to this API.
Endpoints and Headers
Visit our Postman collection to test this request.
Headers
| Header | Sample Value | Description |
|---|---|---|
| X-INS-AUTH-KEY | 1a2b3c4d5e6f | This key is required to authorize your request. Refer to API Authentication Tokens to generate your token. |
Query Parameters
| Parameter | Data Type | Description | Required |
|---|---|---|---|
| startTime | int64 | The time campaign is being launched. Specifies a 10-digit epoch start time. | Yes |
| endTime | int64 | The current date (today’s date on the payload). It can be customizable according to your use case. Specifies a 10-digit epoch start time. | Yes |
Your title goes here
Please note that the endTime field operates on a T-1 logic:
- To define a time range, ensure that the endTime is set to one second before the upper limit of the range.
- For example, for a time range of 11-11-2024 10:00:00 to 11-11-2024 11:00:00, set the end_date to 11-11-2024 10:59:59
- To define a time range, ensure that the endTime is set to one second before the upper limit of the range.
- For example, for a time range of 11-11-2024 10:00:00 to 11-11-2024 11:00:00, set the end_date to 11-11-2024 10:59:59
Your title goes here
The minimum allowed time range for requests is 1 hour. If the requested interval is shorter, the system aggregates and returns data for the entire hour. For instance, a 30-minute request will still yield data for the full hour.
Sample Query
Before sending the request, make sure:
- To replace the authorization value with your API key.
- To replace the sample values in startTime, and endTime with your values in the required data type.
Below is a sample request to retrieve SMS transactional analytics data for a given time range.
curl --location 'https://sms.useinsider.com/analytics/v1/transactional' \
--header 'x-ins-auth-key: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data '{
"startTime": 1727643600,
"endTime": 1728334799
}'Sample Responses
200 Ok
{
"messageParts": 0,
"sent": 0,
"dropped": 0,
"delivery": {
"count": {
"delivered": 0,
"undelivered": 0
},
"rate": "0.00%"
},
"clickThrough": {
"clicks": 0,
"rate": "0.00%"
},
"droppedMessages": {
"internalErrors": {
"count": 0,
"rate": "0.00%"
},
"countryCodeDrops": {
"count": 0,
"rate": "0.00%"
},
"invalidPhoneNumbers": {
"count": 0,
"rate": "0.00%"
}
},
"undeliveredMessages": {
"carrierViolations": {
"count": 0,
"rate": "0.00%",
"details": {}
},
"hardBounces": {
"count": 0,
"rate": "0.00%",
"details": {}
},
"softBounces": {
"count": 0,
"rate": "0.00%",
"details": {}
},
"deliveryFailures": {
"count": 0,
"rate": "0.00%",
"details": {}
},
"deliveryReportMissing": {
"count": 0,
"rate": "0.00%"
}
}
}Your title goes here
You can refer to Transactional SMS Campaign Analytics Metrics for further details.
- 401: Unauthorized request. Please make sure of your authorization key correctness
- 422
- The start time parameter must be earlier than the end time.
- The start time parameter must be within the last 1 year.
- The end time parameter must be earlier than the current time.
- The start time parameter must be a valid integer.
- The end time parameter must be a valid integer.
- 429: Your request exceeds the limit.
Limitations
- All functions must be executed with an HTTPS POST request.
- The X-INS-AUTH-KEY should be provided as the authorization key on the request header. If the key is incorrect, the operation will not be executed and an authorization error will return in the response.
- This API provides data for a 1-year range.
- You can send 100 requests per minute with the same API Key. The perPage value should be between 1 and 100.
The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.