Qyra
ReferenceFunnel

Run funnel query

Execute a funnel analysis query and return conversion metrics

POST/api/v1/projects/{projectUuid}/funnel/query

Authentication: personal access token. The spec defines an api_key security scheme — send an Authorization: ApiKey <your-personal-access-token> header (value format: ApiKey <your key>). A session_cookie scheme (connect.sid) exists for browser sessions. Operations in this spec declare security: [], an artifact of the upstream spec generator — authentication is still enforced by the server.

Path parameters

NameTypeRequiredDescription
projectUuidstringYesThe project UUID

Request body

{
  "breakdownDimensionId": "string",
  "conversionWindow": {
    "unit": "hours",
    "value": 0
  },
  "dateRange": {
    "preset": "last_7_days",
    "type": "preset"
  },
  "steps": [
    {
      "eventName": "string",
      "stepOrder": 0
    }
  ],
  "eventNameFieldId": "string",
  "userIdFieldId": "string",
  "timestampFieldId": "string",
  "exploreName": "string"
}

Responses

200 — Success

{
  "results": {
    "sql": "string",
    "steps": [
      {
        "breakdownValue": "string",
        "medianTimeToConvertSeconds": 0,
        "stepConversionRate": 0,
        "conversionRate": 0,
        "totalUsers": 0,
        "stepName": "string",
        "stepOrder": 0
      }
    ]
  },
  "status": "ok"
}

default — Error

{
  "error": {
    "data": "string",
    "message": "string",
    "name": "string",
    "statusCode": 0
  },
  "status": "error"
}