- Introduction
- Authentication
- Sorting and Pagination
- Errors
- Authentication APIs
- User Authentication APIs
- Account APIs
- Custom Placeholder APIs
- Brand APIs
- Campaign APIs
- Campaign Batch APIs
- Create a Campaign Batch
- Retrieve Errors for a Campaign Batch
- Update a Campaign Batch
- Download Original Campaign Batch CSV File
- Retrieve a Campaign Batch
- List All Campaign Batches
- List All Messages for a Processed Campaign Batch
- Download All Messages for a Processed Campaign Batch
- Remove a Campaign Batch
- Campaign Batch Object
- Campaign Batch Message Object
- Campaign Subscription APIs
- Recipient APIs
- Recipient Batch APIs
- Recipient List APIs
- Keyword Filtering APIs
- Message Template APIs
- Message APIs
- Collection APIs
- Insights APIs
Retrieve Insights for a Campaign
Retrieve data related to a specific campaign, including all batch files for the campaign.
This API returns statistics for messages created within the specified date range and optionally includes an hourly, daily, weekly, or monthly statistics breakdown. If a date range is not provided, statistics for all messages will be returned.
The statistics include both single messages and batch messages.
Endpoint
GET /v1/insights/campaigns/{campaignId}
Authorization Header
Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding
Path Parameters
campaignId REQUIRED
string (UUID)
Unique ID assigned to the campaign in RocketCOMS.
Query Parameters
dateFrom
string (date-time)
This filter will return statistics for messages processed on or after this date. This filter can be used in conjunction with dateTo to specify a date range. If dateFrom or dateTo is not provided, all messages will be returned.
dateTo
string (date-time)
This filter will return statistics for messages processed on or before this date. This filter can be used in conjunction with dateFrom to specify a date range. If dateFrom or dateTo is not provided, all messages will be returned.
interval
string enum, values: HOUR, DAY, WEEK, MONTH
Time interval to use when retrieving business insights.
Request Body
None
Returns
Returns message statistics for the specified brand. The optional intervals array includes an hourly, daily, weekly, or monthly breakdown of the message statistics. For details, see the Insights object.
SAMPLE RESPONSE
{
"status": "0000",
"message": "string",
"result": {
"submitted": 100,
"processed": 100,
"rejected": 0,
"sent": 100,
"delivered": 100,
"failed": 0,
"inProgress": 0,
"intervals": [
{
"dateTime": "2023-04-16T23:08:22.754Z",
"submitted": 20,
"processed": 20,
"rejected": 0,
"sent": 20,
"delivered": 20,
"failed": 0
},
{...},
{...}
]
}
}