---
title: "Create a new funnel"
method: POST
path: "/projects/{project_id}/funnels"
tags: ["Funnels"]
---

# Create a new funnel

`POST /projects/{project_id}/funnels`

## 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`
- Auth: HTTP bearer

## 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 `201`

Funnel created; the body is the funnel with its steps

- FunnelResponse: A funnel and its steps.
  - `created_at` string, date-time, required
  - `description` string, nullable
  - `id` integer, required
  - `is_active` boolean, required
  - `name` string, required
  - `project_id` integer, required
  - `steps` FunnelStepResponse[], required: The steps a visitor goes through, in order.
    - `event_filter` SmartFilter[], required: The filters the step matches events with (empty: every event of `event_name`).
      - 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
    - `id` integer, required
    - `order` integer, required: Position of the step in the funnel, starting at 1.
  - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `500`: Internal server error

## Changes

- **2026-11-26** `e1864d950604`: 2 breaking, 9 info
  - removed the required property `funnel_id` from the response with the `201` status
  - removed the required property `message` from the response with the `201` status
  - added the non-success response with the status `403`
  - added the optional property `description` to the response with the `201` status
  - …7 more

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/funnels/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)
