Skip to main content
The Upstack Data API lets you query your event data, list the measures catalog, and manage dashboard views from anything that speaks HTTP. The same endpoints power the in-app dashboard and the upstack CLI.
If you’re scripting against Upstack from a terminal, prefer the upstack CLI — it wraps these endpoints, handles auth, and adds ergonomics like measure-title resolution.

Base URL

All endpoints in this reference are relative to https://api.upstackdata.com, grouped by service path:
  • /db-mgmt/api/* — analytics queries and the measures catalog.
  • /accounts/api/* — dashboard view management.
  • /tr/api/* — server-side event ingestion.
These surfaces share the same authentication.

Authentication

Every request carries two headers: Mint an API key in the dashboard under Settings → API Keys. The raw key is shown once at creation — store it securely; we keep only a hash.

Scopes

API keys carry one or more scopes. The required scope per endpoint is listed on each endpoint’s page. The catalog endpoint (GET /api/measures) is ungated — any active key can read the measures list. This unblocks discovery use cases (e.g. an LLM looking up canonical measure ids before composing a query).
Older keys minted before May 2026 may carry legacy scopes db_query or attribution_query. These are auto-expanded to analytics:read at request time, so existing keys keep working without rotation. Rotate at your convenience to switch to the modern names.

Error format

Errors are JSON responses with a message field and the appropriate status code.
400 responses on validated endpoints also include an errors array with per-field detail:
The server-side events API (POST /tr/api/events) returns a richer envelope: the same top-level message, plus a requestId and a structured error object with a machine-readable code and per-event details. See Send server-side events for the full shape.

Quickstart

Discover what measures are available, then build a dashboard from three of them.
1

List measures

Find the keys you want (e.g. core.new_customer_roas, core.new_customer_mer, meta.cpm).
2

Build a dashboard from those measures

The response returns the full DashboardView with auto-laid-out sparkline widgets.
3

Open it in the dashboard

Sign in to app.upstackdata.com and pick the new view from the view dropdown.
For the same flow as a single CLI command, see upstack dashboard view build.