API at a glance
Description: This API retrieves a summary of counted events over a specified time period. By default, it returns data for the last 7 days, including event counts, error metrics, and time-series data.
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
- Default time range: Returns data for the last 7 days if no time parameters are specified.
- Time-series data: Provides event counts broken down by date in the specified range.
- Error tracking: Includes error metrics such as invalid user attributes and missing identifiers.
- Event breakdown: Returns counts for both standard and custom events.
- Clickstream page: You can view your event stream on the clickstream page. You can also view errors and download error logs there.
- Use case: Best for monitoring event volumes, tracking trends over time, identifying errors in event tracking, and building analytics dashboards.
Request parameters
Check out the request parameters
Query parameters
Note: Both parameters are optional. If not specified, returns last 7 days of data.
| Parameter | Type | Required | Description |
|---|---|---|---|
timestamp_start | string (ISO 8601) | ❌ No | Specify a timestamp in ISO 8601 format to filter data for events that occurred after it. |
timestamp_end | string (ISO 8601) | ❌ No | Specify a timestamp in ISO 8601 format to filter data for events that occurred before it. |
Example requests & responses
Get event summary
Request
curl --request POST \
--url 'https://api.getblueshift.com/api/v1/event/summary.json?timestamp_start=2023-04-25T00%3A00%3A00Z×tamp_end=2023-04-26T23%3A59%3A59Z' \
--header 'accept: application/json' \
--header 'authorization: Basic <YOUR_API_KEY>'Response
{
"events_chart_stats": [
{
"archives": {},
"error": {
"invalid_user_attributes": [10, 15, 27],
"missing_identifier": [20, 30, 15]
},
"events": {
"add_to_cart": [20, 30, 15],
"subscription_update": [53, 42, 16]
},
"timelapse": ["04/25", "04/26", "04/27"]
}
],
"stats": {
"add_to_cart": {
"archived": false,
"count": 375983,
"display_name": "add_to_cart",
"type": "standard"
},
"subscription_update": {
"archived": false,
"count": 375983,
"display_name": "pageload",
"type": "standard"
}
},
"status": "ok",
"timestamp_end": "2023-06-22T17:16:14.179Z",
"timestamp_start": "2023-06-21T17:16:14.179Z"
}Understanding the response
The response contains several key components:
Event count
The stats key contains details on each event with total counts. Filter by type for standard or custom_event.
Event distribution count
The events_chart_stats object shows event count distribution by day. The timelapse attribute contains dates in MM/DD format, and corresponding arrays show counts for each date.
Event processing errors
Error counts and distribution by day are included. Errors are categorized by type (e.g., missing_identifier, invalid_user_attributes).
Error types
| Error type | Description |
|---|---|
es_index_error | Indexing error due to data type mismatch between event payload and backend system (e.g., string value for date parameter). |
event_name_missing | Event is missing the required event attribute. |
event_verification_error | Event signature verification failed (only applicable if event verification feature is enabled). |
invalid_customer_id | Invalid customer_id (e.g., '0', or greater than 64 characters). |
invalid_device_id | Device ID does not match the format for iOS or Android device. |
invalid_email | Invalid email address. |
invalid_event_attributes | Invalid attributes in event payload (e.g., event name exceeds 100 characters, attributes contain script tags). |
invalid_product | Product not found in catalog. |
invalid_user_attributes | Invalid user attributes in payload (e.g., invalid gender value). |
missing_identifier | Missing customer identifier (cookie, device_id, email, email_hash, or retailer_customer_id). |
missing_product | Whitelisted product/catalog event missing product/catalog_ids in payload. |
parsing_error | Unable to parse JSON payload. |
transaction_indexing_error | Error while updating transaction record. |
unknown_error | Unexpected processing error. Contact Blueshift support for more information. |
user_lock_error | Unable to acquire lock on user. |
user_not_found_error | User not found in system. |