> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/guides-monitoring/monitor/query-your-data-insights-api.md).

# Query your data — Insights API

The [Statistics dashboard](broken://spaces/EsokFUBfsbM9mlwavmMB/pages/OHbNFPmU45yCLxKLUbY9) shows wallet data visually. The **Insights API** gives programmatic access to that same data, so teams can build custom dashboards, feed BI tools, run ad hoc analysis, or automate reporting.

{% hint style="info" %}
No code is required to export data. The [Report](/guides-monitoring/monitor/report.md) page lets teams export event data as CSV from the back office.
{% endhint %}

<details>

<summary><strong>Real-world examples</strong></summary>

* A marketing team compares install volume by `Medium` after a CRM campaign.
* An operations team tracks scans per store and monitors uninstall trends by programme.
* A BI team pulls wallet events into Tableau, Looker, or Power BI for weekly reporting.

</details>

## What is the Insights API?

The Insights API is a query interface for wallet events stored in The Wallet Crew platform. Every tracked event is queryable, including pass creations, installs, uninstalls, scans, notifications, and updates. It is the right choice when the back-office dashboard is not enough, such as for custom date ranges, custom groupings, BI ingestion, or automated reports.

## What you can query

The Insights API covers the same operational events used across monitoring and reporting. Each event answers a different business question.

| Event                   | What it captures                                                                                                    | Example question you can answer                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `Pass:Created`          | When a pass record was created                                                                                      | How many passes were issued this month per store?          |
| `Pass:Installed`        | When a pass was added to Apple Wallet or Google Wallet, with source data such as `Medium`, `Tag`, `URL`, and `Host` | Which email campaign drove the most installs last week?    |
| `Pass:Uninstalled`      | When a pass was fully removed from all wallets                                                                      | What is the uninstall rate by programme?                   |
| `Pass:Updated`          | When pass data was changed                                                                                          | How many passes were updated after the last campaign?      |
| `Pass:UpdateSent`       | When a push update was delivered to a device                                                                        | Are updates reaching devices reliably?                     |
| `Pass:Scanned`          | When a pass barcode was scanned                                                                                     | How many scans per day happened at each location?          |
| `Pass:NotificationSent` | When a push notification was sent                                                                                   | How many notifications were sent per programme this month? |

## Filters available

All queries support filtering by date range, pass template, event type, and source of installation. Source filters include `Medium`, `Tag`, `URL`, and `Host`.

Any pass metadata field can also be used as a filter. That includes business fields such as `storeId`, `programmeId`, region, or any custom metadata stored on the pass.

## How it relates to the Statistics dashboard

{% hint style="info" %}
The **Statistics** dashboard is built on the Insights API. Everything visible in the dashboard can also be queried directly through the API, with more flexibility on groupings, filters, and date ranges.
{% endhint %}

For a no-code view of the same data, use the [Statistics dashboard](broken://spaces/EsokFUBfsbM9mlwavmMB/pages/OHbNFPmU45yCLxKLUbY9). To push events to external tools in real time, see [Send wallet events to your tools](/guides-monitoring/monitor/sync-pass-installation-status-to-your-crm.md).

## Getting started

The fastest path is to authenticate, inspect the available endpoints, and run a first aggregate query.

{% stepper %}
{% step %}

### 1. Authenticate

Use the API key in the `X-API-KEY` header.

```http
X-API-KEY: <API_KEY>
```

{% endstep %}

{% step %}

### 2. Explore the available endpoints

Use the [Insights API reference](https://github.com/TheWalletCrew/docs/blob/main/guides/develop/guides/insights-api.md) to inspect endpoints, parameters, and response shapes.
{% endstep %}

{% step %}

### 3. Start with a simple query

Begin with a count of `Pass:Installed` events over the last 30 days. Group the result by `Medium` to see which acquisition source drove the most wallet adds during the period.

This first query gives a quick validation that authentication works and that source data is available on the programme.
{% endstep %}
{% endstepper %}

## Common use cases

Most teams start with one recurring reporting need, then expand to deeper analysis. The same event stream can support both operational monitoring and BI workflows.

* Feed installation and uninstall counts into Tableau, Looker, or Power BI.
* Automate a weekly report of programme performance by store or region.
* Build a custom activation funnel by correlating `Pass:Created` with `Pass:Installed`.
* Query scan events to build a redemption analytics view.
* Validate campaign delivery by comparing `Pass:NotificationSent` with install spikes.

## FAQ

<details>

<summary>When should the Insights API be used instead of Statistics?</summary>

Use **Statistics** for a quick visual read of programme performance. Use the **Insights API** when custom filters, custom groupings, BI ingestion, or automated reporting are needed.

</details>

<details>

<summary>Does the Insights API expose the same data as the dashboard?</summary>

Yes. The Statistics dashboard is built on the same event data. The API adds more flexibility for query shape, time range, and downstream use.

</details>

<details>

<summary>Is code required to access wallet event data?</summary>

No. The [Report](/guides-monitoring/monitor/report.md) page supports CSV export from the back office. The Insights API is useful when a programmable workflow is needed.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thewalletcrew.io/guides-monitoring/monitor/query-your-data-insights-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
