Technical Documentation

Comprehensive technical documentation and advanced guides for Funl. For onboarding and beginner help, see the Getting Started Guide.

API Reference

Funl provides a comprehensive REST API with 18 endpoints for programmatic funnel management. All endpoints require API key authentication.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from Account Settings. Pro plan or higher required.

Available Endpoints

Funnels (10 endpoints)

  • GET /api/internal/v1/funnels - List all funnels
  • POST /api/internal/v1/funnels - Create new funnel (with optional template_id)
  • GET /api/internal/v1/funnels/:id - Get funnel details
  • PATCH /api/internal/v1/funnels/:id - Update funnel
  • DELETE /api/internal/v1/funnels/:id - Delete funnel
  • POST /api/internal/v1/funnels/:id/deploy - Deploy funnel
  • GET /api/internal/v1/funnels/:id/content - Get content
  • PUT /api/internal/v1/funnels/:id/content - Update content
  • POST /api/internal/v1/funnels/:id/assign-domain - Assign domain
  • POST /api/internal/v1/funnels/:id/remove-domain - Remove domain

Templates (2 endpoints)

  • GET /api/internal/v1/templates - List templates
  • GET /api/internal/v1/templates/:id - Get template details

Images (4 endpoints)

  • POST /api/internal/v1/images/upload - Upload image file
  • POST /api/internal/v1/images/upload-from-url - Upload from URL
  • GET /api/internal/v1/images - List images
  • DELETE /api/internal/v1/images/:id - Delete image

File Operations (2 endpoints)

  • DELETE /api/internal/v1/funnels/:id/files/:filename - Delete file
  • PUT /api/internal/v1/funnels/:id/files/:filename/rename - Rename file

Example Request

# Create empty funnel
curl -X POST https://funl.ad/api/internal/v1/funnels \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My New Funnel"}'

# Create funnel with template
curl -X POST https://funl.ad/api/internal/v1/funnels \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My New Funnel", "template_id": "snow-template"}'

📖 Complete API Documentation

Get detailed parameter information, request/response examples, and error codes for all 18 endpoints:

View Full API Reference →

Webhooks

Set up webhooks to receive real-time notifications about funnel events.
(Webhook event types, payloads, and setup instructions will go here.)

Advanced Deployment

Deploy funnels to custom environments, CI/CD, or your own infrastructure.
(Advanced deployment options, CLI usage, and environment variables will go here.)

Custom Domains

Connect your own domain to give your funnel a professional appearance. Available for Pro, Team, and Enterprise plans.

Assigning a Domain

Use the API to assign a custom domain to your funnel:

POST /api/internal/v1/funnels/:id/assign-domain
{
  "domain": "example.com"
}

DNS Setup

After assigning, configure your domain's DNS settings:

CNAME Record:

Name: @ (or your subdomain)

Value: funl.ad

Domain Requirements

  • • Domain format: example.com (no http/https or www)
  • • One domain per funnel maximum
  • • Domain must be unique across all Funl users
  • • Pro plan or higher required

Removing Domains

Remove domain assignment to revert to funl.ad subdomain:

POST /api/internal/v1/funnels/:id/remove-domain

Template JSON Structure

Templates are JSON files containing funnel metadata and all source code. Use templates to quickly start new funnels with proven designs.

Template Schema


{
  "id": "snow-template",
  "category": "Advertorials", 
  "steps": 2,
  "name": "Snow Template",
  "description": "A winter-themed toothbrush funnel template",
  "previewImage": "snow.png",
  "files": {
    "src/index.html": "<!DOCTYPE html>...",
    "src/css/style.css": "body { ... }",
    "src/js/script.js": "document.addEventListener..."
  }
}

Field Descriptions

  • id: Unique template identifier (used in API calls)
  • category: Template category (e.g., "Advertorials", "E-commerce")
  • steps: Number of funnel steps/pages
  • name: Human-readable template name
  • description: Template description for users
  • previewImage: Preview image filename
  • files: Object mapping file paths to content

Template Customization

Templates support placeholder replacement during application:

POST /api/internal/v1/templates/apply
{
  "template_id": "snow-template",
  "funnel_id": "funnel-uuid",
  "customizations": {
    "title": "Custom Product Name",
    "product_name": "Amazing Toothbrush"
  }
}

Placeholders like {{title}} and {{product_name}} in template files will be replaced with custom values.

Integration Guides

Connect Funl with external tools and services to enhance your funnel workflow.

Claude Web Integration (MCP)

Use Claude Web to manage your funnels through natural language commands via our MCP server integration.

Setup Steps

  1. Get your API key from Account Settings
  2. In Claude Web, connect to our MCP server at: https://funl.ad/api/mcp
  3. Provide your API key when prompted for authentication
  4. Start managing funnels with natural language commands

Example Commands

• "Create a new funnel called 'Summer Sale'"

• "Apply the snow template to my funnel"

• "Upload this image to my project"

• "Deploy my funnel and assign domain example.com"

Image Management

Upload and manage images for your funnels programmatically or through Claude Web.

Upload from URL

POST /api/internal/v1/images/upload-from-url
{
  "url": "https://example.com/hero-image.jpg",
  "project_id": "your-funnel-id",
  "filename": "hero-image.jpg"
}

Features

  • • Automatic storage in Supabase with CDN delivery
  • • Images automatically added to funnel files for editor access
  • • Support for JPG, PNG, GIF, WebP formats (5MB max)
  • • Automatic filename sanitization and uniqueness

File Operations

Manage non-image files within your funnels programmatically.

Delete Files

DELETE /api/internal/v1/funnels/:id/files/src%2Fold-page.html

Rename Files

PUT /api/internal/v1/funnels/:id/files/src%2Fold-page.html/rename
{
  "new_name": "src/new-page.html"
}

Note: File operations exclude image files. Use the Image API for complete image management including storage cleanup.

Plan Feature Access

  • Free: Basic funnel operations only
  • Starter: Templates + basic file operations
  • Pro: Images, domains, analytics, AI features
  • Team/Enterprise: All features + collaboration