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

# Create Page

`POST /workspaces/{workspace_id}/pages`

Create a new internal page in the workspace. By default, creating a page without references to a funnel or show page step will create a standalone landing page.

You can optionally attach the page to a funnel by providing either:
- `funnel.funnel_id`: Creates a new show page step in the specified funnel. When provided without `show_page_step_id`, the page is added as the last step of the funnel, positioned after the currently last page.
- `funnel.show_page_step_id`: Swaps the referenced step to point at this newly created page. The page previously linked to that step becomes an orphan (kept in the workspace, no longer linked to any step).

**`sort_order`** (optional, top-level): Controls the zero-based position within the funnel when creating with `funnel.funnel_id`. `0` inserts before the first existing step; omit to append at the end. Out-of-bounds values (negative or greater than the current step count) return 422. `sort_order` is ignored when `funnel.show_page_step_id` is used — the swap target's current position is preserved.

**`funnel.after_show_page_step_id`** (optional, with `funnel.funnel_id`): Insert the new step right after the referenced show page step — also places the page inside a split branch. Alternative to `sort_order`. An id that does not resolve to a step in the funnel returns 400.

To also attach products to the page's checkout step in the same call, pass `show_page_step.product_ids: [...]` (sibling of `funnel`). This is the only way to set products at create time — the legacy `funnel.products` shape is rejected with a 400. Products attachment is **additive** and **all-or-nothing**: any unresolved id fails the whole request and the page is not created.

**`external_url` is rejected** — to create an externally-hosted (SDK) page use `POST /api/v2/workspaces/:workspace_id/pages/external`.

## Path parameters

- `workspace_id` integer, required

## Query parameters

- `expand[]` string[]

## Request body

- object
  - `page` PageParameters — Pages
    - `name` string, required — Page name of the editable page element.
    - `current_path` string — The URL path for the page. If left blank, a randomized path will be generated. When attaching to a funnel, this value becomes the ShowPageStep path (the user-facing URL), and the page's own current_path will be set to a randomized value with a suffix, since the ShowPageStep path is the source of truth for funnel pages.
    - `theme_id` integer — The ID of the theme to use for this page.
    - `description` string, nullable — A short description of the page (max 1000 characters).
    - `seo_title` string, nullable — Custom title for search engine results.
    - `seo_description` string, nullable — Custom meta description for search engine results.
    - `seo_index` boolean — Whether search engines should index this page. Defaults to false.
    - `sort_order` integer — Optional zero-based position within the funnel when creating with `funnel.funnel_id`. `0` inserts before the first step; omit to append at the end. Ignored when `funnel.show_page_step_id` is provided. Out-of-bounds values return 422.
    - `funnel` object — Optional funnel association. Use either funnel_id (to create a new step) or show_page_step_id (to attach to existing step). If both are provided, show_page_step_id takes precedence and funnel_id is ignored.
      - `funnel_id` string — The public ID of the funnel to attach this page to. A new show page step will be created as the last step of the funnel, unless `after_show_page_step_id` is provided.
      - `after_show_page_step_id` union — Controls where the new step is inserted within the funnel (only relevant when `funnel_id` is provided). Accepts either: - A ShowPageStep `id` (the function id, as exposed under `show_page_step.id` in page responses) — inserts the new step immediately after the referenced show page step. - The workflow root step's id (integer) — inserts the new step at the beginning of the funnel. If omitted or null, the page is appended after the currently last step of the funnel. Returns 400 if the id does not resolve to a valid step in the funnel.
        - integer
        - string
      - `show_page_step_id` string — The ID of an existing show page step to attach this page to. Takes precedence over funnel_id if both are provided.
    - `show_page_step` object — Optional. Mutates the show_page_step that the page is attached to via the `funnel` block above. Only valid when the page is also being linked to a funnel via the `funnel` block — passing `show_page_step.product_ids` without a funnel link returns 400.
      - `product_ids` string[] — List of product public IDs to append to the step's checkout. This is **additive** — products are appended to any products already on the step (relevant when `funnel.show_page_step_id` is used to attach to an existing step); products already attached are skipped. All-or-nothing — if any ID does not resolve to a workspace product, the page is not created and a 400 is returned. To remove products, use `DELETE /api/v2/pages/:id/products`.
    - `head_code` string, nullable — Custom code to inject into the page's <head> section. Content should be wrapped in appropriate HTML tags such as <script>, <link>, <meta>, or <style>. Set to null to clear existing code.
    - `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. Set to null to clear existing code.
    - `footer_code_mode` 'append' | 'replace' — How to handle footer_code. 'append' adds to existing code (default), 'replace' overwrites.
    - `custom_css` string, nullable — Raw CSS to apply at the page level (no <style> wrapper). Maps to the CSS tab in the page editor's Code Editor panel. Internal pages only. Set to null to clear existing CSS.
    - `custom_css_mode` 'append' | 'replace' — How to handle custom_css. 'append' adds to existing CSS (default), 'replace' overwrites.
    - `markup` string — A valid PML (Page Markup Language) string that replaces the page's visual tree. Page metadata (name, path, SEO settings) is preserved. See the [Page Markup Skill](https://accounts.myclickfunnels.com/.well-known/page-markup/skill.md) for the full DSL reference.

## Response `201`

Created

- PageAttributes — Pages
  - `id` integer — Page ID
  - `public_id` string — The public identifier of the page
  - `workspace_id` integer — Workspace ID that the page belongs to.
  - `name` string — Page name of the editable page element. Want to filter by it? See our <i><u><a href="https://developers.myclickfunnels.com/docs/filtering-by-page" target="_blank">help guide on that topic</a><u><i>.
  - `description` string, nullable — A short description of the page (max 1000 characters).
  - `theme_id` integer, nullable — Theme
  - `created_at` string, date-time — Created at
  - `seo_title` string, nullable — Custom title for search engine results. Falls back to the site's SEO title if not set.
  - `seo_description` string, nullable — Custom meta description for search engine results. Falls back to the site's SEO description if not set.
  - `seo_index` boolean — Whether search engines should index this page. Defaults to false.
  - `updated_at` string, date-time — Updated at
  - `type` 'landing_page' | 'site_page' | 'funnel_page' | 'theme_page' | 'null', nullable — The type of page. Can be one of `landing_page`, `site_page`, `funnel_page` or `theme_page`. May be `null` for a page that matches none of these categories.
  - `current_path` string, nullable — The current URL path for the page resource. This is the canonical URL for landing and site pages. `null` for externally-hosted (SDK) pages. **For funnel pages this is NOT the customer-facing URL** — that's `url` (or `show_page_step.current_path` for the path component). The page-level current_path on a funnel page does not route the visitor through the workflow step, so a `<checkout/>` element on it will not see the step's attached products.
  - `url` string, nullable — The customer-facing URL for the page on the live site. For funnel pages this routes through the workflow step (which feeds `<checkout/>` its IncludedProducts). Always prefer this over `current_path` when constructing links.
  - `show_page_step` object, nullable — The show page step (the workflow step's _function_) associated with this page. The `products` array is the live list of products attached to this step's checkout; it is mutated via `show_page_step.product_ids` on page create/update (additive) and `DELETE /api/v2/pages/:id/products` (removal).
    - `id` integer — The ID of the show page step (function). Pass this as `show_page_step_id` when positioning split-test or conditional-split steps via `/api/v2/funnels/:id/split_test_steps` and `/api/v2/funnels/:id/conditional_split_steps`.
    - `public_id` string — The public identifier of the show page step (function). May be passed as `show_page_step_id` alongside other `public_id` references in your code.
    - `name` string — The name of the step in the funnel. This is the page name that is visible in the funnel builder for a show page step.
    - `current_path` string, nullable — The current URL path for the step in the funnel. This is the path component of the live, customer-facing URL for funnel pages. `null` for externally-hosted (SDK) pages.
    - `sort_order` integer — The zero-based position of this step within the funnel. The first step is 0, the second is 1, and so on. Returned in every page response; pass `sort_order` on create/update to control positioning.
    - `products` object[] — Products currently attached to this step's checkout. Mutated via `show_page_step.product_ids` on page create/update (additive) and `DELETE /api/v2/pages/:id/products` (removal).
      - `id` integer — Product ID
      - `public_id` string — Product public ID
      - `name` string — Product name
  - `funnel` object, nullable — The funnel associated with this page (if the page is part of a funnel)
    - `id` integer — The unique identifier of the funnel
    - `public_id` string — The public identifier of the funnel
    - `name` string — The name of the funnel
  - `sdk` object, nullable — Present for externally-hosted (SDK) pages; `null` for internal pages. Contains the SDK integration token and the external URL where the page is hosted.
    - `token` string — The SDK page token (prefixed `cfp_`). Embed this in the external page via a `<meta name="cf-page-token" content="<token>">` tag and include the SDK script tag to register the page with ClickFunnels.
    - `external_url` string — The fully-qualified URL of the externally-hosted page.
  - `head_code` string, nullable — **Expandable** Custom HTML/JavaScript code injected into the page 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.
  - `custom_css` string, nullable — **Expandable** Raw CSS applied at the page level (no <style> wrapper). Maps to the CSS tab in the page editor's Code Editor panel. Internal pages only. Only returned when expand[]=custom_css is provided. Note: expanding may add latency, especially on list endpoints. Use sparingly.
  - `markup` string — **Expandable** The PML (Page Markup Language) representation of the page's visual tree. Only returned when expand[]=markup is provided. Note: expanding may add latency, especially on list endpoints. Empty string when the page has no visual content yet. See the [Page Markup Skill](https://accounts.myclickfunnels.com/.well-known/page-markup/skill.md) for the full DSL reference.

## Other responses

- `400` — Bad Request
- `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/versions/ae6313eaa176/schema)
