---
title: "Create Funnel"
method: POST
path: "/workspaces/{workspace_id}/funnels"
tags: ["Funnel"]
---

# Create Funnel

`POST /workspaces/{workspace_id}/funnels`

Create a new funnel in the workspace.

Creating a funnel automatically creates a workflow. You can then add pages to the funnel by creating pages with `funnel.funnel_id` set to the new funnel's ID (see the Create Page endpoint).

**Client flow for building a funnel with pages:**
1. `POST /api/v2/workspaces/:id/funnels` — creates the funnel (workflow auto-created)
2. `POST /api/v2/workspaces/:id/pages` with `{ page: { name: "...", funnel: { funnel_id: "<funnel_id>" }, markup: "<PML string>" } }` — creates each page, auto-links it to the funnel, and applies the markup in one call
3. `PATCH /api/v2/pages/:id` with `{ page: { markup: "<PML string>" } }` — applies or updates visual content (PML markup) on an existing page
4. Steps 2 and 3 can be combined: passing `markup` in the create call sets the initial visual content without a separate PATCH

The internal step/workflow wiring is handled automatically — API clients never need to manage workflows or steps directly.

## Path parameters

- `workspace_id` integer, required

## Request body

- object
  - `funnel` FunnelParametersCreate — Funnels
    - `name` string, required — Name of the Funnel
    - `current_path` string — The URL path for the funnel. If not provided, a path will be auto-generated from the name.
    - `live_mode` boolean — In Live Mode your Funnel cannot be tested and will process live payments
    - `domain_id` integer, nullable — The ID of the domain to associate with this funnel. Use the Domains API to look up available domain IDs.
    - `tag_ids` integer[] — An array of tag IDs to associate with this funnel
    - `head_code` string, nullable — Custom code to inject into the funnel's <head> section. Content should be wrapped in appropriate HTML tags such as <script>, <link>, <meta>, or <style>.
    - `head_code_mode` 'append' | 'replace' — How to handle head_code. 'append' adds to existing code (default), 'replace' overwrites.
    - `footer_code` string, nullable — Custom code to inject before the closing </body> tag. JavaScript should be wrapped in <script> tags.
    - `footer_code_mode` 'append' | 'replace' — How to handle footer_code. 'append' adds to existing code (default), 'replace' overwrites.

## Response `201`

Created

- FunnelAttributes — Funnels
  - `id` integer — Funnel ID
  - `public_id` string — The public identifier of the funnel
  - `workspace_id` integer — The ID of the workspace that the funnel belongs to
  - `name` string — Name of the Funnel
  - `archived` boolean — Archived status
  - `current_path` string — The URL path of the funnel
  - `live_mode` boolean — In Live Mode your Funnel cannot be tested and will process live payments
  - `domain_id` integer, nullable — The ID of the domain associated with this funnel. Use the Domains API to look up available domain IDs.
  - `favicon_image_id` string, nullable — The ID of the image used as the favicon for this funnel
  - `created_at` string, date-time — Created at
  - `updated_at` string, date-time — Updated at
  - `tags` object[] — Funnel Tags
    - `id` integer — ID
    - `public_id` string — Public ID
    - `name` string — The name of the funnel tag
    - `color` string — The color of the funnel tag
  - `head_code` string, nullable — **Expandable** Custom HTML/JavaScript code injected into the funnel head section. Only returned when expand[]=head_code is provided. Note: expanding may add latency, especially on list endpoints. Use sparingly.
  - `footer_code` string, nullable — **Expandable** Custom HTML/JavaScript code injected before the closing body tag. Only returned when expand[]=footer_code is provided. Note: expanding may add latency, especially on list endpoints. Use sparingly.

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/myclickfunnels/apis/clickfunnels-api.md) · [All operations](https://skmtc.net/myclickfunnels/apis/clickfunnels-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myclickfunnels/clickfunnels-api/revisions/ae6313eaa176/schema)
