Get event history

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).
  • 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)"
    }
  ]
}
Query Params
string
required
integer
≤ 50
Responses

400

Bad request – The request is invalid due to missing or incorrect parameters.

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 resource was not found.

422

Unprocessable entity – The request was well-formed but could not be processed due to validation or state errors.

429

Rate limit exceeded – Too many requests. Reduce request frequency.

500

Internal server error – An unexpected server error occurred. Contact Blueshift 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 with exponential backoff.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json