# Send events and read reports over REST

> Send game, website and server events to Manalens, and read the same reports as the dashboard over REST with the Query API: KPIs, retention, funnels and more.

Canonical URL: https://manalens.dev/features/api

Manalens has three public interfaces. The event collector takes game, website and server events. The REST API reads the dashboard reports with the Query API and writes profile properties. The MCP server gives the same reports to AI assistants.

[How to install](https://docs.manalens.dev/install)

## Keep write and read credentials separate

The Publishable key sends website and game events. The Secret key sends server events, such as purchases, from your backend. An API key reads reports through the Query API and the MCP server. The keys are not interchangeable, and an API key works on its own project only.

## Read the dashboard reports over REST

The Query API returns KPIs, event timeseries, top pages, sources, locations and events, user lifecycle and frequency, retention, funnels, user paths, attribution and profiles. Each endpoint runs the same report code as the dashboard and the MCP server, so the numbers match.

Each endpoint needs the scope that matches it: analytics, attribution or profiles. Call it from a server: a request from a browser is refused.

Read the KPIs for November with an API key

```
curl "https://api.manalens.dev/v0/projects/$PROJECT_ID/query/kpis?date_from=2026-11-01&date_to=2026-11-30" \
  -H "Authorization: Bearer $MANALENS_API_KEY"
```

## Reuse the event envelope

Page and track payloads include a message ID, event timestamp, context, scalar properties, and optional user ID. Manalens resolves the project from the Publishable key and derives anonymous identity instead of trusting a browser-supplied visitor ID.

## Plans and limits

The Query API and profile property writes are on Studio and the Studio trial; on Indie and the Launch Pass a request returns 402. A key shares its rate limits with the MCP server: 120 requests per minute per key and 600 per minute per workspace.

## Frequently asked questions

**Can I read analytics with the Publishable key?**

No. The Publishable key only sends events. Read reports with an API key through the Query API or the MCP server.

**Is there a public read API?**

Yes. The Query API reads the dashboard reports over REST with an API key, on Studio. The private API that the dashboard uses is not public and can change without notice.

**Where does analytics data live?**

Tinybird stores analytics events and materialized profiles. Postgres holds application state.

## Explore next

- [Query API documentation](https://docs.manalens.dev/api/query)
- [MCP Server](https://manalens.dev/features/mcp-server)
- [SQL Explorer](https://manalens.dev/features/sql-explorer)
