VoidhashDocs
DocumentationAPI reference
Dashboard
Essentials
API overview
Authentication
Endpoints
Analytics
Api_keys
Auth
Component_dev_sessions
Component_registry
Components
Development
Events
Experiments
Feature_flag_overrides
Feature_flag_targets
Feature_flags
Ingest_policy
Notification_sends
Notifications
Organizations
Payment_provider_configurations
Payment_provider_products
Paywall_locations
Paywalls
Perks
Persons
Products
Projects
Push_notification_configurations
Schema
Sdk
Users
Webhooks
Analytics
Event capture
Query Insights
Query Acquisition Report

Query Insights

POST
/api/v1/analytics/queries/insights

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

projectId?string|null
queries*array<>
Items1 <= items <= 20

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/analytics/queries/insights" \  -H "Content-Type: application/json" \  -d '{    "queries": [      {        "insightId": "builtin/revenue",        "key": "string",        "timeRange": {          "preset": "today"        }      }    ]  }'
{  "results": [    {      "insightId": "builtin/revenue",      "key": "string",      "resolvedTimeRange": {        "end": "string",        "start": "string"      },      "result": {        "kind": "metric",        "sparkline": [          {            "timestamp": "string",            "value": 0          }        ],        "summary": {          "currency": "string",          "value": 0        }      }    }  ]}
{  "_tag": "Api/InvalidMetricError",  "message": "string"}
{  "_tag": "Api/AuthenticationError",  "cause": "string",  "message": "string"}
{  "_tag": "Api/ActionForbiddenError",  "message": "string"}
{  "_tag": "Api/UnknownInsightError",  "insightId": "string",  "message": "string"}
{  "_tag": "Api/AnalyticsServiceError",  "cause": "string"}
PreviousAuthenticationNextQuery Acquisition Report