Use this endpoint to export the performance data of all the campaigns for a given date range.
API at a glance
Description: This API allows you to retrieve campaign performance metrics (such as sends, opens, clicks, purchases, and revenue) for all campaigns that ran within a specific date range.
NoteCampaign metrics noted on the UI are calculated using the account time zone. If you want the metrics from the report API to match that of the metrics you see on the UI, edit start/end date to reflect this.
Authentication & testing
Testing the API on this page
How to try it here
- Use your User API Key as the Username (leave Password blank).
- Select the appropriate API endpoint based on your Blueshift region.
- Enter the necessary parameters and click Try It to run the request.


Authentication using Base64 encoding
Note for developers
API requests require authentication using HTTP Basic Authentication with an API key.
The API key serves as the username, while the password field should be left empty.
The format to encode is: your_api_key: (note the trailing colon).
This string must be Base64-encoded and included in the request's Authorization header as follows:
Authorization: Basic encoded_valueYou can generate the encoded value using a trusted Base64 encoder.
Postman collection
Try it with Postman: Explore the API using Blueshift's Postman collection.
Things to know before you start
- Required parameters: Both
start_timeandend_timeare required to fetch data. - Date format: Timestamps must be in ISO 8601 format (e.g.,
2023-10-06T20:41:21.000Z). - Optional filtering: You can filter results by campaign
statusortag_data. - Performance metrics: The response includes comprehensive statistics such as sends, opens, clicks, purchases, revenue, and more.
- Use case: Best for generating campaign performance reports, analyzing metrics across multiple campaigns, or exporting data for external analysis.
Request parameters
Check out the request parameters
Query parameters
Parameter | Type | Required | Description |
|---|---|---|---|
|
| ✅ Yes | Specify a timestamp in the ISO 8601 format to filter the performance data of the campaigns that ran after it. |
|
| ✅ Yes | Specify a timestamp in the ISO 8601 format to filter the performance data of the campaigns that ran before it. |
|
| ❌ No | Specify a status to filter the campaigns.
|
|
| ❌ No | Specify tags to filter the campaigns.
|
Example requests & responses
Get campaign performance summary
Request
curl --request GET \
--url 'https://api.getblueshift.com/api/v1/campaigns.json?start_time=2023-05-05T20%3A41%3A21.000Z&end_time=2023-10-06T20%3A41%3A21.000Z&status=launched' \
--header 'accept: application/json' \
--header 'authorization: Basic <YOUR_API_KEY>'Response
{
"campaigns": [
{
"campaign_executing": false,
"campaign_execution_ended_at": "2024-10-03T04:57:24.000Z",
"campaign_execution_started_at": "2023-10-05T04:57:24.000Z",
"created_at": "2023-10-03T04:57:24.000Z",
"currency": "USD",
"enddate": "2024-05-03T04:57:24.000Z",
"exec_term": "on_going",
"name": "Daily market tips",
"recurring_number": 1,
"recurring_schedule": "continuously",
"recurring_time": "2024-01-03T14:45:00.000Z",
"recurring_unit": "day",
"segment_name": "Daily market tips segment",
"segment_uuid": "9dfd5cdc-fedc-40b5-8c65-ba533c57c8bf",
"startdate": "2024-01-02T14:45:00.000Z",
"statistics": {
"activations": 0,
"add_to_carts": 0,
"assigns": 0,
"bounces": 0,
"checkouts": 0,
"clicks": 0,
"deliveries": 0,
"end_time": "2023-10-06T20:41:21.000Z",
"media_spent": 0,
"opens": 20,
"pageloads": 5,
"purchases": 75,
"revenue": 19618,
"sends": 110,
"spam_reports": 2,
"start_time": "2023-05-05T20:41:21.000Z",
"timezone": "Pacific/Los_Angeles",
"unique_clicks": 150,
"unique_opens": 250,
"unsubscribes": 2,
"visits": 2160
},
"status": "paused",
"updated_at": "2024-05-05T20:41:21.000Z",
"uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}
]
}API error responses
Note
The following error codes are commonly returned by Blueshift APIs. Depending on the specific endpoint, not all may apply.
Status code | Description | Example responses |
|---|---|---|
400 Bad Request | The request is invalid due to missing or incorrect parameters. This includes missing fields, invalid values, formatting issues, or conflicts such as duplicate data. |
|
401 Unauthorized | API authentication failed due to an invalid or missing API key. |
|
403 Forbidden | The API key does not have sufficient permissions to perform this action. |
|
404 Not Found | The specified campaign was not found. Verify the campaign UUID. |
|
422 Unprocessable Entity |
|
|
429 Too Many Requests | The request limit has been exceeded. Reduce request frequency. |
|
500 Internal Server Error | An unexpected server error occurred. Contact support if the issue persists. |
|
502 Bad Gateway | The server received an invalid response. Retry the request. |
|
503 Service Unavailable | The service is temporarily unavailable. Try again later. |
|
504 Gateway Timeout | The server took too long to respond. Retry the request with exponential backoff. |
|