Galileo Highlights API

Overview

Use the Highlights API to get a summary of a user’s recent interactions with your application. The API gives your team an immediate understanding of the user's journey, allowing them to provide personalized assistance and address issues efficiently. It can be used to, for example:

  • Add summaries of a user's recent behavior to their support ticket, helping to save time understanding and reproducing their issue
  • Update your outgoing sales or account management workflows with short summaries of a user's recent experiences that can be reviewed before contacting them
  • Send summaries of the actions taken before a low NPS score was given to a Slack channel for added context when reviewing feedback

Example of Highlights being sent to a ticketing system

For an overview of Highlights and how to access them, see here. This feature is available for Pro and Enterprise plans. We offer a complimentary trial period followed by a range of pricing options.

Using Zendesk? See our Zendesk Highlights Integration.

Using Intercom? See our Intercom Highlights Integration.

Request Highlights

POST - https://api.logrocket.com/v1/orgs/<your_org_id>/apps/<your_project_id>/highlights/

The values for your_org_id and your_project_id will come from your App ID, which can be found under Settings > Project Settings, or in the URL for your LogRocket dashboard. For example, an App ID of foo/bar is composed of an org ID foo and a project ID bar:

POST - https://api.logrocket.com/v1/orgs/foo/apps/bar/highlights/

Authentication

To make Highlights requests, you'll need your API key. You can find your API key in the LogRocket dashboard under Settings > Project Settings. Once you have your API key, provide it in the Authorization header when making requests to the Highlights API. For example:

curl -X POST 'https://api.logrocket.com/v1/orgs/<your_org_id>/apps/<your_project_id>/highlights/' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: token <your-api-key>' \
  -d '{"userEmail": "[email protected]"}'

Example request bodies

Request with userEmail

Send the following request body to summarize up to 10 most recent sessions recorded in the last 30 days for the user associated with the email [email protected]. The results must be retrieved using the id in the response body.

{
  "userEmail": "[email protected]"
}

Request with userID, timeRange, and webhookURL

Send the following request body to summarize up to 10 most recent sessions recorded in the provided time range for the user associated with ID google-oauth2|abc123. When ready, the results will be included in the body of a POST request sent to https://example.com/endpoint:

{
  "userID": "google-oauth2|abc123",
  "question": "What issue did this user experience?",
  "timeRange": {
    "startMs": 1715481030000,
    "endMs": 1715567430000
  },
  "webhookURL: "https://example.com/endpoint"
}
FieldOptional or RequiredDescription
userEmailOne of userEmail or userID is requiredThe email of a user provided in LogRocket.identify() calls
userIDOne of userEmail or userID is requiredThe ID of a user provided in LogRocket.identify() calls
questionOptionalA string of what question you want answered about the user(s) experiences. If you leave this blank, Galileo will generate a general summary of the user(s) experiences.
timeRangeOptionalAn object containing startMsand endMs timestamps between which sessions for the requested Highlights will be selected. When timeRange is provided, up to 10 most recent sessions recorded within that timeRange will be summarized (limited by your org's retention period). When timeRange is not provided, up to 10 most recent sessions recorded within the last 30 days will be summarized.
timeRange.startMsRequired when a timeRange is providedInteger epoch timestamp in milliseconds that defines the beginning of the requested timeRange. Must be a value smaller than endMs.
timeRange.endMsRequired when a timeRange is providedInteger epoch timestamp in milliseconds that defines the end of the requested timeRange. Must be a value larger than startMs.
webhookURLOptionalWhen ready, Highlights results will be included in the body of a POST request sent to this URL

Receive Highlights Results

Requests sent to the Highlights API will receive an immediate response with an id in the body. For example:

{
    "id": "0cc12cad4b5b8b93760edf7fb5731ac66fbc8a766f9431df6c1e72b214ed6a65"
}

The id is a reference to your request that you can use to retrieve your results when they're ready. Highlights results generally take 1-3 minutes to be generated. If you included a webhookURL in your request, no further action is necessary to receive results: when they're ready, they'll be included in the body of a POST request sent to the URL you provided.

If you didn't include a webhookURL in your request, make a GET request with the id query parameter to check on the status of your results:

curl -X GET 'https://api.logrocket.com/v1/orgs/<your_org_id>/apps/<your_project_id>/highlights?id=0cc12cad4b5b8b93760edf7fb5731ac66fbc8a766f9431df6c1e72b214ed6a65' \
  -H 'Authorization: token <your-api-key>'

If Highlights are still being generated, you'll receive the following in the response body:

{
  "result": null,
  "status": "PENDING",
  "appID": "<your_org_id>/<your_project_id>",
  "requestID": "0cc12cad4b5b8b93760edf7fb5731ac66fbc8a766f9431df6c1e72b214ed6a65"
}

If Highlights are ready, you'll receive a response body like:

{
  "result": {
    "highlights": "The user [checks out their cart](https://app.logrocket.com/<your_org_id>/<your_project_id>/s/5-14de95d6-d5b8-1a62-0a3a-4858caf874b0/0?t=1715564734801) and [encounters an error loading settings](https://app.logrocket.com/<your_org_id>/<your_project_id>/s/5-3cde95d6-a5b8-4a62-9b3a-6aa834f8747c/0?t=1715564554783).",
    "sessions": [
      {
        "recordingID": "5-3cde95d6-a5b8-4a62-9b3a-6aa834f8747c",
        "sessionID": 0,
        "highlights": "The user [encounters an error loading settings](https://app.logrocket.com/<your_org_id>/<your_project_id>/s/5-3cde95d6-a5b8-4a62-9b3a-6aa834f8747c/0?t=1715564554783) and [the issue persists](https://app.logrocket.com/<your_org_id>/<your_project_id>/s/5-3cde95d6-a5b8-4a62-9b3a-6aa834f8747c/0?t=1715564734801)."
      },
      {
        "recordingID": "5-14de95d6-d5b8-1a62-0a3a-4858caf874b0",
        "sessionID": 0,
        "highlights": "The user [adds an item to their cart](https://app.logrocket.com/<your_org_id>/<your_project_id>/s/5-14de95d6-d5b8-1a62-0a3a-4858caf874b0/0?t=1715564554783) and [proceeds to checkout](https://app.logrocket.com/<your_org_id>/<your_project_id>/s/5-14de95d6-d5b8-1a62-0a3a-4858caf874b0/0?t=1715564734801)"
      },
      ...
    ]
  },
  "status": "READY",
  "appID": "<your_org_id>/<your_project_id>",
  "requestID": "0cc12cad4b5b8b93760edf7fb5731ac66fbc8a766f9431df6c1e72b214ed6a65"
}

result.highlights is a summary across all sessions included in the result. Each session included in the result also has its own individual summary at result.sessions[].highlights. The highlights strings also contain Markdown-formatted links to relevant times in the referenced session(s) that you can follow to learn more about the described events.

Finally, if Highlights fail to generate, you'll receive the following in the response body:

{
  "result": null,
  "status": "FAILED",
  "appID": "<your_org_id>/<your_project_id>",
  "requestID": "0cc12cad4b5b8b93760edf7fb5731ac66fbc8a766f9431df6c1e72b214ed6a65"
}

In this case, the original POST request can be made again to retry Highlights generation.