Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.elasticfunnels.io/llms.txt

Use this file to discover all available pages before exploring further.

List All Pages

Retrieve all pages for a project.
brand
string
required
The brand/project ID
Request
GET /api/brands/{brand}/pages/all
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/pages/all \
  -H "EF-Access-Key: your_api_key_here"
{
  "data": [
    {
      "id": 1,
      "name": "Landing Page",
      "slug": "landing-page",
      "status": "active",
      "type": "landing",
      "created_at": "2024-01-15T10:30:00.000000Z"
    },
    {
      "id": 2,
      "name": "Thank You Page",
      "slug": "thank-you",
      "status": "active",
      "type": "thankyou",
      "created_at": "2024-01-16T11:20:00.000000Z"
    }
  ]
}

Get Page Details

Retrieve details about a specific page.
brand
string
required
The brand/project ID
page
string
required
The page ID
Request
GET /api/brands/{brand}/pages/{page}
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id} \
  -H "EF-Access-Key: your_api_key_here"
{
  "id": 1,
  "name": "Landing Page",
  "slug": "landing-page",
  "status": "active",
  "type": "landing",
  "meta_title": "Amazing Product",
  "meta_description": "Get your product now",
  "url": "https://yourdomain.com/landing-page",
  "created_at": "2024-01-15T10:30:00.000000Z",
  "updated_at": "2024-12-10T08:20:00.000000Z"
}

Create Page

Create a new page.
brand
string
required
The brand/project ID
title
string
required
Page title
page_type
string
Page builder type: must be editor (optional if html is provided, required otherwise)
slug
string
URL-friendly slug (optional, auto-generated if not provided)
status
string
Page status: published, draft, offline, imported (default: draft)
html
string
Raw HTML content (automatically sets page_type to editor). If this HTML contains <inline-split-test>, the Pages API stores that source markup as provided.
domain_id
number
Custom domain ID (optional)
funnel_id
number
Funnel ID to associate with (optional)
folder_id
number
Folder ID to organize page (optional)
is_index
boolean
Set as index page (default: false)
css
string
Custom CSS styles
type
string
Template type: nutra-prelander, nutra-advertorial, leadgen, webinar-registration
template_id
string
Template ID to use (optional)
seo_title
string
SEO meta title
seo_blur_title
string
Alternative title when tab is not focused
seo_description
string
SEO meta description
requires_login
boolean
Require user login to access
requires_password
boolean
Require password to access
password
string
Page password (required if requires_password is true)
redirect_url
string
URL to redirect to
ga_measurement_id
string
Google Analytics measurement ID
meta_pixel_id
string
Meta (Facebook) Pixel ID
custom_javascript
string
Custom JavaScript code
is_upsell_page
boolean
Mark as upsell page
show_affiliate_pixels
boolean
Show affiliate tracking pixels
disable_default_scripts
boolean
Disable default tracking scripts
Request
POST /api/brands/{brand}/pages

Create Basic Page

cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/pages \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "New Landing Page",
    "slug": "new-landing",
    "page_type": "editor",
    "status": "published"
  }'

Create Page with HTML

cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/pages \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Custom HTML Page",
    "slug": "custom-page",
    "status": "published",
    "html": "<!DOCTYPE html><html><head><title>My Page</title></head><body><h1>Hello World</h1></body></html>",
    "css": "body { background: #f5f5f5; font-family: Arial, sans-serif; }"
  }'
  • When you provide html in the request, page_type is automatically set to editor, so you don’t need to specify it
  • The API only supports editor type pages. The visual drag-and-drop builder is available only through the web dashboard
  • On update, providing html will automatically convert the page to editor type if it isn’t already
  • If your html contains <inline-split-test>, the create/update response returns stored source HTML, not the runtime-resolved winning variant HTML
{
  "id": 3,
  "title": "New Landing Page",
  "slug": "new-landing",
  "status": "published",
  "page_type": "editor",
  "url": "https://yourdomain.com/new-landing",
  "created_at": "2024-12-10T15:45:00.000000Z"
}

Inline Split Test HTML in Pages API

When you send <inline-split-test> markup through POST /api/brands/{brand}/pages or PUT /api/brands/{brand}/pages/{page}:
  • The endpoint stores the full source HTML you send in html
  • The response does not replace the tag with the chosen runtime variant
  • The public Pages API does not inject the auto-managed id attribute during create/update
Example request body:
{
  "title": "Split Test Page",
  "slug": "split-test-page",
  "status": "published",
  "html": "<inline-split-test name=\"Headline Test\"><variant name=\"control\" weight=\"70\"><h1>Original Headline</h1></variant><variant name=\"challenger\" weight=\"30\"><h1>New Headline</h1></variant></inline-split-test>"
}
Example create response shape:
Response
{
  "page": {
    "id": 12,
    "title": "Split Test Page",
    "slug": "split-test-page",
    "status": "published",
    "page_type": "editor",
    "html": "<inline-split-test name=\"Headline Test\"><variant name=\"control\" weight=\"70\"><h1>Original Headline</h1></variant><variant name=\"challenger\" weight=\"30\"><h1>New Headline</h1></variant></inline-split-test>"
  }
}
Runtime rendering is different from the API response. When a visitor loads the page, the server replaces the entire block with the chosen variant wrapped like this:
<div data-sid="[split_test_id]" data-cid="[variant_code]">
  <!-- Full HTML of the chosen variant -->
</div>
If you use a save flow that returns normalized inline split test HTML with a server-generated id, replace your local/source HTML with that returned HTML before the next update. This only matters when your next request includes html again. If html is omitted because nothing changed, the existing stored HTML stays unchanged. Re-sending the original <inline-split-test> markup without the injected id in a later html update can cause the server to create a new split test record on every save.

Update Page

Update an existing page. Only include the fields you want to change.
Common causes of errors on PUT/PATCH:
SymptomCauseFix
422 with title is requiredtitle is always required by the validator, even if you’re only changing HTMLAlways include "title" in the body
401 / redirect to loginMissing or invalid EF-Access-Key header, or key doesn’t belong to this brandCheck the header name (EF-Access-Key) and value
403 module accessBrand user role doesn’t have pages accessUpdate role permissions in Project Settings
Slug 422 uniqueness errorProvided slug already exists for another page on the same domainChoose a unique slug or omit it
brand
string
required
The brand/project ID
page
string
required
The page ID
title
string
required
Page title
slug
string
URL-friendly slug
status
string
Page status: published, draft, offline, imported
domain_id
number
Custom domain ID
folder_id
number
Folder ID to organize page
is_index
boolean
Set as index page
html
string
Raw HTML content (automatically sets page_type to editor). If this HTML contains <inline-split-test>, the Pages API stores that source markup as provided.
css
string
Custom CSS styles
seo_title
string
SEO meta title
seo_blur_title
string
Alternative title when tab is not focused
seo_description
string
SEO meta description
requires_login
boolean
Require user login to access
requires_password
boolean
Require password to access
password
string
Page password
redirect_url
string
URL to redirect to
disable_right_click
boolean
Disable right-click on page
prevent_indexing
boolean
Prevent search engine indexing
funnel_visible_only
boolean
Only accessible through funnel flow
ga_measurement_id
string
Google Analytics measurement ID
meta_pixel_id
string
Meta (Facebook) Pixel ID
custom_header_code
string
Custom header code
custom_javascript
string
Custom JavaScript code (must be valid script tags only)
is_upsell_page
boolean
Mark as upsell page
show_affiliate_pixels
boolean
Show affiliate tracking pixels
disable_default_scripts
boolean
Disable default tracking scripts
Request
PUT /api/brands/{brand}/pages/{page}

Update Basic Information

cURL
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id} \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Page Name",
    "status": "published"
  }'

Update page title and status

cURL
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id} \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Page Name",
    "status": "published"
  }'

Update HTML content

cURL
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id} \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Custom Page",
    "html": "<!DOCTYPE html><html><body><h1>Updated Content</h1></body></html>",
    "css": "body { font-family: Arial; }"
  }'
Providing html automatically converts the page to editor type if it isn’t already.

Update SEO settings

cURL
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id} \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Landing Page",
    "seo_title": "Best Product Ever - Buy Now",
    "seo_description": "Discover the amazing benefits of our product",
    "prevent_indexing": false
  }'
{
  "id": 3,
  "brand_id": 42,
  "title": "My Custom Page",
  "slug": "my-custom-page",
  "status": "published",
  "page_type": "editor",
  "html": "<!DOCTYPE html><html><body><h1>Updated Content</h1></body></html>",
  "css": "body { font-family: Arial; }",
  "seo_title": "My Custom Page",
  "seo_description": null,
  "domain_id": null,
  "folder_id": null,
  "updated_at": "2024-12-11T09:15:00.000000Z"
}

Page Types and Fields

API Page Type: Editor Only

The API only supports creating editor pages. The visual drag-and-drop builder is only available through the web dashboard interface.
Editor Pages allow direct HTML/CSS editing through the API:
  • html - Raw HTML content
  • css - Custom CSS styles
  • page_type - Must be editor (or automatically set when html is provided)

Automatic Editor Type Assignment

When you provide the html field in a create or update request, the page is automatically set to editor type, even if you don’t specify page_type.
{
  "title": "My Page",
  "html": "<html>...</html>"
  // page_type is automatically set to "editor"
}

Update Behavior

When updating pages:
  • Only provided fields are updated - omitted fields remain unchanged
  • html field is updated if provided in the request
  • css field is updated if provided in the request
  • Providing html will automatically set/update page_type to editor
  • Empty strings will clear the field value

Custom JavaScript Validation

The custom_javascript field must contain only valid <script> tags. HTML comments and <noscript> tags are allowed.
<!-- Valid -->
<script>
  console.log('Hello World');
</script>

<!-- Invalid - contains non-script elements -->
<div>Some content</div>
<script>console.log('test');</script>

Delete Page

Delete a page.
brand
string
required
The brand/project ID
page
string
required
The page ID
Request
DELETE /api/brands/{brand}/pages/{page}
cURL
curl -X DELETE https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id} \
  -H "EF-Access-Key: your_api_key_here"
{
  "message": "Page deleted successfully"
}

Plan Limits and Errors

When creating pages, the API checks against your plan limits:

Plan Limit Exceeded Error

{
  "error": "Plan limit exceeded",
  "plan_error": {
    "type": "plan_limit_exceeded",
    "feature": "pages",
    "message": "You have reached the maximum number of pages (10) allowed for your plan.",
    "current_count": 10,
    "limit": 10,
    "plan_name": "Starter",
    "upgrade_info": {
      "required_plan": "Professional",
      "feature_description": "Unlimited pages"
    }
  },
  "errors": {
    "title": ["You have reached the maximum number of pages (10) allowed for your plan. Please upgrade to create more pages."]
  }
}
Status Code: 422 Unprocessable Entity

Plan Feature Not Available Error

{
  "error": "Plan limit exceeded",
  "plan_error": {
    "type": "plan_upgrade_required",
    "feature": "pages",
    "message": "Your current plan does not allow creating pages.",
    "plan_name": "Free Trial",
    "upgrade_info": {
      "required_plan": "Starter",
      "feature_description": "Create landing pages"
    }
  },
  "errors": {
    "title": ["Your current plan does not allow creating pages. Please upgrade to access this feature."]
  }
}
Status Code: 422 Unprocessable Entity

Clone Page

Create a copy of an existing page.
brand
string
required
The brand/project ID
page
string
required
The page ID to clone
name
string
Name for the cloned page (optional, defaults to “Copy of [original name]”)
Request
POST /api/brands/{brand}/pages/{page}/clone
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/pages/{page_id}/clone \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cloned Landing Page"
  }'
{
  "id": 4,
  "name": "Cloned Landing Page",
  "slug": "cloned-landing-page",
  "status": "inactive",
  "type": "landing",
  "created_at": "2024-12-10T16:00:00.000000Z"
}