Insider's SMS Analytics API allows you to get the SMS campaigns list from your back-end without using the Insider One's InOne panel. This API returns Active, Test, Passive, Completed, and Stopped campaigns with this endpoint.
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 | Default Value |
|---|---|---|---|---|
| Page | Integer | Specifies the number of pages of SMS campaigns | Yes | 1 |
| PerPage | Integer | Specifies the number of SMS campaigns to be listed per page | Yes | 10 |
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 own API key.
Below is a sample request to retrieve SMS analytics data in smaller, paged results.
curl --location 'https://sms.useinsider.com/analytics/v1/list?perPage=10&page=1' \
--header 'x-ins-auth-key:1a2b3c4d5e6f \'Your title goes here
Campaigns are listed in order from newest to oldest.
Sample Responses
200 Ok
{
"current_page":1,
"data":[
{
"campaignId":12692,
"campaignName":"Sample Campaign 3",
"startTime":1727770020,
"status":"completed"
},
{
"campaignId":12691,
"campaignName":"Sample Campaign 2",
"startTime":1727770260,
"status":"completed"
},
{
"campaignId":12689,
"campaignName":"Sample Campaign 1",
"startTime":1727770356,
"status":"completed"
},
],
"first_page_url":"https://sms.useinsider.com/analytics/v1/list?perPage=10&page=1",
"from":1,
"last_page":160,
"last_page_url":"https://sms.useinsider.com/analytics/v1/list?perPage=10&page=160",
"next_page_url":"https://sms.useinsider.com/analytics/v1/list?perPage=10&page=2",
"per_page":10,
"prev_page_url":null,
"to":10,
"totalCampaign":1596 }- 401: Unauthorized request. Please make sure of your authorization key correctness
- 422: Your data is not valid.
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.