Get event history

Retrieves up to 50 most recent successful events for the given event name, starting with the latest.

API at a glance

Description: This API retrieves up to 50 most recent successful events for a specified event name, starting with the latest. The response includes event objects with attributes specific to that event type.

Authentication & testing

Testing the API on this page

How to try it here

  • Use your User API Key as the Username (leave Password blank).
  • User API Key Location
  • Select the appropriate API endpoint based on your Blueshift region.
  • API - Select 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_value

You 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

  • Authentication: Requires an Event API Key (not User API Key as stated in some documentation).
  • Response structure: The response is an object where each key is an event name (e.g., app_install) and the value is an array of event data.
  • Limit: The limit parameter is optional but cannot exceed 50. If no limit is specified, the system default is used.
  • Event-specific attributes: The data returned for each event includes properties specific to that event type (e.g., an app_install event includes app_name and app_version).
  • Use case: Best for debugging event tracking, verifying event data, reviewing recent event payloads, and analyzing event properties.

Request parameters

Check out the request parameters

Query parameters

ParameterTypeRequiredDescription
event_namestring✅ YesThe name of the event for which to fetch history (e.g., app_install).
limitinteger❌ NoMaximum number of records to return. Defaults to system limit if not specified. Maximum value: 50.

Example requests & responses

Get event history for app_install

Request

curl --request GET \
     --url 'https://api.getblueshift.com/api/v1/event/history?event_name=app_install&limit=2' \
     --header 'accept: application/json' \
     --header 'authorization: Basic <YOUR_EVENT_API_KEY>'

Response

{
  "app_install": [
    {
      "_bsft_ts": "2025-09-17T10:26:55.000Z",
      "account_uuid": "11112222-3333-4444-5555-666677778888",
      "app_installed_at": "2025-09-17T10:26:54.687Z",
      "app_name": "com.example.demoapp",
      "app_version": "5.0.0 (42)",
      "bsft_sdk_version": "5.0.0",
      "country_code": "US",
      "device_id": "abcd1234-5678-90ef-ghij-1234567890kl",
      "device_manufacturer": "ExampleTech",
      "device_type": "android",
      "enable_inapp": true,
      "enable_push": false,
      "event": "app_install",
      "event_uuid": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
      "language_code": "en",
      "os_name": "Android 16",
      "site": "demoappsite.com",
      "timestamp": "2025-09-17T10:26:54.688Z",
      "timestamp_epoch": 1758104814,
      "user_agent": "Dalvik/2.1.0 (Linux; U; Android 16; Pixel 8 Build/ABC123)"
    },
    {
      "_bsft_ts": "2025-09-17T06:47:22.572Z",
      "account_uuid": "11112222-3333-4444-5555-666677778888",
      "app_installed_at": "2025-09-17T06:47:22.060Z",
      "app_name": "com.example.demoapp",
      "app_version": "5.0.0 (42)",
      "bsft_sdk_version": "5.0.0",
      "country_code": "US",
      "device_id": "mnop9876-5432-10fe-dcba-0987654321zx",
      "device_manufacturer": "ExampleTech",
      "device_type": "android",
      "enable_inapp": true,
      "enable_push": true,
      "event": "app_install",
      "event_uuid": "eeee5555-ffff-6666-gggg-7777hhhh8888",
      "language_code": "en",
      "os_name": "Android 16",
      "site": "demoappsite.com",
      "timestamp": "2025-09-17T06:47:22.062Z",
      "timestamp_epoch": 1758091642,
      "user_agent": "Dalvik/2.1.0 (Linux; U; Android 16; Pixel 8 Build/XYZ456)"
    }
  ]
}
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.

{ "errors": { "name": ["can't be blank"] } }

{ "errors": { "startdate": ["can't be blank"] } }

401 Unauthorized

API authentication failed due to an invalid or missing API key.

{ "message": "Not authorized" }

403 Forbidden

The API key does not have sufficient permissions to perform this action.

{ "message": "Permission denied" }

404 Not Found

The specified campaign was not found. Verify the campaign UUID.

{ "message": "Campaign not found" }

422 Unprocessable Entity

  • The campaign cannot be paused due to its current status (e.g., already completed or archived).
  • One or more scheduling parameters may be invalid (if applicable).

{ "message": "Campaign cannot be paused in its current status." }

{ "message": "Invalid schedule values" }

429 Too Many Requests

The request limit has been exceeded. Reduce request frequency.

{ "message": "Rate limit exceeded" }

500 Internal Server Error

An unexpected server error occurred. Contact support if the issue persists.

{ "message": "Internal Server Error - Please contact support for more information." }

502 Bad Gateway

The server received an invalid response. Retry the request.

{ "message": "Bad Gateway - Please retry the request." }

503 Service Unavailable

The service is temporarily unavailable. Try again later.

{ "message": "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.

{ "message": "Gateway Timeout - The server took too long to respond. Retry with exponential backoff." }

Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!