---
title: "Preview funnel metrics without creating the funnel"
method: POST
path: "/projects/{project_id}/funnels/preview"
tags: ["Funnels"]
---

# Preview funnel metrics without creating the funnel

`POST /projects/{project_id}/funnels/preview`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/funnels/preview`
- Auth: HTTP bearer

Requires `FunnelWrite`, the same as creating a funnel: although nothing is
persisted, the request carries an arbitrary caller-defined step list that
is run as an ad-hoc multi-step query over the project's analytics events.
The console only calls it from the create/edit funnel form, whose save
already needs `FunnelWrite`; read-only callers use the saved-funnel
`GET .../funnels/{funnel_id}/metrics` endpoint instead.

## Path parameters

- `project_id` integer, required

## Request body

- CreateFunnelRequest
  - `description` string, nullable
  - `name` string, required
  - `steps` CreateFunnelStep[], required
    - `event_filter` SmartFilter[]
      - union: Smart filter presets for common funnel patterns
        - object: Match specific page path
          - `type` 'page_path', required
          - `value` string, required: Match specific page path
        - object: Match specific hostname
          - `type` 'hostname', required
          - `value` string, required: Match specific hostname
        - object: Match UTM source
          - `type` 'utm_source', required
          - `value` string, required: Match UTM source
        - object: Match UTM campaign
          - `type` 'utm_campaign', required
          - `value` string, required: Match UTM campaign
        - object: Match UTM medium
          - `type` 'utm_medium', required
          - `value` string, required: Match UTM medium
        - object: Match referrer hostname
          - `type` 'referrer_hostname', required
          - `value` string, required: Match referrer hostname
        - object: Match specific channel (organic, paid, direct, referral, etc.)
          - `type` 'channel', required
          - `value` string, required: Match specific channel (organic, paid, direct, referral, etc.)
        - object: Match device type (mobile, desktop, tablet)
          - `type` 'device_type', required
          - `value` string, required: Match device type (mobile, desktop, tablet)
        - object: Match browser
          - `type` 'browser', required
          - `value` string, required: Match browser
        - object: Match operating system
          - `type` 'operating_system', required
          - `value` string, required: Match operating system
        - object: Match language
          - `type` 'language', required
          - `value` string, required: Match language
        - object: Match custom event properties by JSON path Format: {"path": "user.plan", "value": "premium"} This will match events where props->'user'->>'plan' = 'premium', falling back to the legacy `event_data` column when `props` is NULL
          - `type` 'custom_data', required
          - `value` object, required: Match custom event properties by JSON path Format: {"path": "user.plan", "value": "premium"} This will match events where props->'user'->>'plan' = 'premium', falling back to the legacy `event_data` column when `props` is NULL
            - `path` string, required
            - `value` string, required
    - `event_name` string, required

## Response `200`

Funnel metrics preview

- FunnelMetricsResponse
  - `average_completion_time_seconds` number, double, required
  - `funnel_id` integer, required
  - `funnel_name` string, required
  - `overall_conversion_rate` number, double, required
  - `step_conversions` StepConversionResponse[], required
    - `average_time_to_complete_seconds` number, double, required
    - `completions` integer, required
    - `conversion_rate` number, double, required
    - `drop_off_rate` number, double, required
    - `step_id` integer, required
    - `step_name` string, required
    - `step_order` integer, required
  - `total_entries` integer, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Insufficient permissions (requires funnel:write)
- `500`: Internal server error

## Changes

- **2026-10-20** `7ee3ab1b2020`: 1 info
  - added the non-success response with the status `403`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/funnels/preview/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
