VoidhashDocs
DevelopersHelp centerGuidesAPI reference
Dashboard
Essentials
API overview
Authentication
Event capture
Push device API
Webhooks
Webhook delivery
Webhook events
Projects & keys
Projects
API keys
Audit log
Customers & access
Persons
Products
Perks
Sandbox
Paywalls
Paywalls
Paywall locations
Components
Component registry
Assets
Experiments & flags
Experiments
Feature flags
Analytics & events
Analytics
Analytics alerts
Events
Ingest policy
VoidQL
Tracking domains
Ads
Ads
Ad accounts
Meta measurement
Payments & stores
Payment providers
Payment provider products
Purchase history imports
Payment sources
Webhooks & notifications
Webhooks
Push notifications
Push configurations
Automations
Organization & team
Organizations
Members
Invitations
Billing
Your account
Profile
Session
Notices
Connected apps
Terms of Service
Developer tools
Schema
SDK
Run a VoidQL query
Explain a VoidQL query
Retrieve the VoidQL schema

Retrieve the VoidQL schema

The tables (relations) a VoidQL query can read, each with its columns (type, description, whether it is personal data, and the column it refers to, such as subscriptions.person_id → people.id), its JSON namespaces, and the functions a query may call.

Money columns are integer minor units: *_amount in the row's currency, *_usd in US cents.

Guide: Query analytics with VoidQL

GET
/api/v1/projects/{projectId}/analytics/voidql/schema

Authorization

AuthorizationBearer <token>

A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.

In: header

Path parameters

projectId*string

The project's id, proj_.... A secret key works only in the project it belongs to.

Examples

curl -X GET "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/analytics/voidql/schema" \  -H "Authorization: Bearer vh_sk_..."
{  "version": 3,  "relations": [    {      "name": "subscriptions",      "description": "One row per subscription a person holds in a store, with its current state. A renewal updates the row; each charge is a row of `transactions`.",      "columns": [        {          "name": "id",          "type": "String",          "description": "The subscription's id.",          "isPersonalData": false,          "references": null        },        {          "name": "person_id",          "type": "String",          "description": "The person, after identify merges.",          "isPersonalData": false,          "references": "people.id"        },        {          "name": "store",          "type": "String",          "description": "The store or payment source: 'apple-app-store', 'google-play', 'stripe', 'external' (a payment source the customer reports) or 'development'. Can be NULL.",          "isPersonalData": false,          "references": null        },        {          "name": "is_active",          "type": "Bool",          "description": "Whether it gives access right now: active and not past its expiry or billing grace period.",          "isPersonalData": false,          "references": null        },        {          "name": "mrr_usd",          "type": "Int64",          "description": "Monthly recurring revenue it contributes now, in US cents (0 in a trial or once ended). Can be NULL.",          "isPersonalData": false,          "references": null        }      ],      "namespaces": []    },    {      "name": "people",      "description": "One row per person: anonymous visitors and identified users, after identify merges (merged-away and deleted people are left out). signed_up_at and signup_surface say when and where they first identified.",      "columns": [        {          "name": "id",          "type": "String",          "description": "The person's id.",          "isPersonalData": false,          "references": null        },        {          "name": "email",          "type": "String",          "description": "Email (personal data). Can be NULL.",          "isPersonalData": true,          "references": null        }      ],      "namespaces": [        {          "name": "traits",          "description": "Custom person traits (JSON, personal data). Access via traits.<key>.",          "isPersonalData": true        }      ]    }  ],  "functions": [    "count",    "countIf",    "sum",    "avg",    "toStartOfMonth",    "dateDiff"  ]}
{  "error": {    "type": "invalid_request",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "unauthenticated",    "code": "invalid_api_key",    "message": "This secret key is not valid."  }}
{  "error": {    "type": "permission_denied",    "code": "permission_denied",    "message": "Insufficient permissions."  }}
{  "error": {    "type": "not_found",    "code": "project_not_found",    "message": "There is no project proj_tz4a98xxat96iws9zmbrgj3a, or this credential cannot use it.",    "param": "projectId"  }}
{  "error": {    "type": "internal",    "code": "internal_error",    "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing."  }}

Response body

application/json

application/json

application/json

application/json

application/json

application/json

Errors

This operation adds no error codes of its own. It can fail with the errors every operation shares, such as unauthenticated; see Errors.

More in VoidQL

  • Run a VoidQL query POST
  • Explain a VoidQL query POST

Something wrong or missing on this page? Tell us by email or on Discord.

PreviousExplain a VoidQL queryNextList tracking domains

On this page

AuthorizationPath parametersExamplesResponse bodyErrorsMore in VoidQL