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: Use this API to retrieve up to 50 most recent successful events for a specified event type. The response includes event objects with attributes specific to that type.

Authentication: Requires a Users API Key.

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

  • Endpoint: The path to this API is /api/v1/event/history.
  • Response type: 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 will include properties specific to that event (e.g., an app_install event includes app_name and app_version).

Request parameters

Check out the request parameters
ParameterTypeRequiredDescription
event_namestring✅ YesThe name of the event for which to fetch history. For example, app_install.
limitinteger❌ NoMaximum number of records to return. Defaults to system limit if not specified.

Maximum value: 50.

Example requests & responses

Check out the example
{
  "event_name": "app_install",
  "limit": 2
}
{
  "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 codeDescriptionExample responses
400 Bad RequestThe request is invalid due to a missing or incorrect parameter, such as event_name.{ "errors": { "event_name": ["can't be blank"] } }
401 UnauthorizedAPI authentication failed due to an invalid or missing API key.{ "message": "Not authorized" }
403 ForbiddenThe API key does not have sufficient permissions to perform this action.{ "message": "Permission denied" }
404 Not FoundThe specified resource or event was not found. Verify the event name or path.{ "message": "Event not found" }
422 Unprocessable EntityThe request was well-formed but could not be processed due to validation or state errors.{ "errors": { "event_name": ["is not valid"] } }
429 Too Many RequestsThe request limit has been exceeded. Reduce request frequency.{ "message": "Rate limit exceeded" }
500 Internal Server ErrorAn unexpected server error occurred. Contact Blueshift support if the issue persists.{ "message": "Internal Server Error - Please contact support for more information." }
502 Bad GatewayThe server received an invalid response. Retry the request.{ "message": "Bad Gateway - Please retry the request." }
503 Service UnavailableThe service is temporarily unavailable. Try again later.{ "message": "Service Unavailable - The service is temporarily unavailable. Try again later." }
504 Gateway TimeoutThe 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!