Skip to main content
POST
Run a read-only analytics query for a project

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Replo-Api-Version
enum<string>
required

The public API version to use for this request.

Available options:
2026-10-29

Query Parameters

projectId
string<uuid>
required

Body

application/json
query
string
required

Run a read-only analytics query for a project.

Rules:

  • Use SELECT or WITH queries only.
  • Do not add project or namespace filters; project scoping is enforced server-side.
  • Use session_attribution(since, until) for cross-project session and attributed revenue; stored computed metrics and page rollups are project-local.
  • Session revenue repeats across visited pages: deduplicate by subject for totals. Attributed revenue splits credit across eligible pageviews before domain filters.
  • Aggregate-state rollup columns must use the matching ClickHouse merge function, such as countMerge, uniqMerge, or sumMerge, and queries must group by selected dimensions.
  • Maximum execution time: 60 seconds.
  • Maximum result rows: 100000.

Queryable tables, their columns, and the external metric views for connected integrations are listed at https://docs.replo.app/api-reference/analytics-tables.

External metric views take named since/until dates (YYYY-MM-DD, inclusive); the views that also need settings JSON or another argument say so on that page. Credentials and project scope are injected server-side: never supply auth_token or project_id. In MCP, call get_integration_status first for connection IDs, setup links, and supported views. Missing or misconfigured integrations can return zero rows: do not report that as measured zero activity. Use provider-specific tools for metric/property discovery and detailed provider-native reports. External results can be cached for up to eight hours, and report views cap provider results at 10,000 rows; narrow dates or dimensions if exceeded. Match currencies, reporting timezones, and attribution definitions before combining sources.

Minimum string length: 1

Response

Run a read-only analytics query for a project

rowCount
integer
required
data
object[]
required