Run a scoped analytics query
Runs one read-only SQL query against a selected Bily dataset. Bily applies the authenticated store scope before the SQL runs.
Authorizations
A server-side Bily API key created under Settings > MCP > Access key fallback. Select the intended store before creating it.
Headers
An organization ID returned by GET /context or GET /organizations. Required for GET /stores and optional for store-scoped paths.
"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"
Path Parameters
The exact store URL returned by GET /context or GET /stores.
"store.example.com"
Body
ad_metrics, product_metrics, country_metrics, device_metrics, dimensions, customer_ltv, cohorts, platform_assets, data_quality, datasources_report, touchpoints Read-only SQL that starts with SELECT or WITH and reads from the scoped _ alias.
5000"SELECT channel, sum(spend) AS spend FROM _ GROUP BY channel ORDER BY spend DESC"
1 <= x <= 20001 <= x <= 50001 <= x <= 10000conversion, first_touch day, hour Response
Request completed successfully.
ad_metrics, product_metrics, country_metrics, device_metrics, dimensions, customer_ltv, cohorts, platform_assets, data_quality, datasources_report, touchpoints x >= 0