Websites API

Manage websites, pages, sections, settings, domains, navigation, and layout programmatically.

Get your API key

Websites (Projects)

Each website gets a subdomain ({subdomain}.escalateflow.com), optional custom domains, and its own pages, forms, shop, blog, and settings.

GET /api/v1/projects/list/

List all your websites.

Response

{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "name": "My Agency",
      "subdomain": "myagency",
      "landing_prefix": "lp",
      "homepage_type": "page",
      "is_active": true,
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-04-01T10:00:00Z"
    }
  ],
  "count": 3
}
GET /api/v1/projects/{project_id}/

Get details of a specific website.

POST /api/v1/projects/

Create a new website with AI-generated pages. Synchronous - may take 30-120 seconds.

Request Body

{
  "name": "My Agency Website",
  "subdomain": "myagency",
  "domain": "www.myagency.com",
  "pages": [
    {
      "slug": "",
      "prompt": "Create a professional homepage for a digital marketing agency",
      "is_homepage": true
    },
    {
      "slug": "about",
      "prompt": "Create an about page with company history and team",
      "title": "About Us"
    }
  ]
}

Parameters

FieldTypeRequiredDescription
namestringYesWebsite name (max 100 chars)
subdomainstringNoCustom subdomain (auto-generated if empty)
domainstringNoCustom domain (requires DNS setup)
pagesarrayYes1-20 pages to generate
pages[].slugstringNoURL path (empty = homepage)
pages[].promptstringYesAI generation prompt (min 10 chars)
pages[].titlestringNoPage title (auto-generated if empty)
pages[].is_homepagebooleanNoSet as homepage

Response

{
  "success": true,
  "data": {
    "project_id": "uuid",
    "name": "My Agency Website",
    "subdomain": "myagency",
    "urls": {
      "subdomain": "https://myagency.escalateflow.com",
      "custom_domain": "https://www.myagency.com"
    },
    "pages": [
      {"slug": "", "title": "Home", "status": "success"},
      {"slug": "about", "title": "About Us", "status": "success"}
    ]
  }
}
POST /api/v1/projects/async/

Create a website asynchronously. Returns immediately with a job ID for polling.

Same request body as POST /projects/

Response

{
  "success": true,
  "data": {
    "job_id": "uuid",
    "status": "pending"
  },
  "message": "Website generation started. Poll /api/v1/jobs/{job_id}/ for status."
}

Pages

GET /api/v1/projects/{project_id}/pages/

List all pages of a website.

Response

{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "slug": "about",
      "title": "About Us",
      "is_homepage": false,
      "status": "published",
      "created_at": "2026-01-01T00:00:00Z"
    }
  ]
}
POST /api/v1/projects/{project_id}/ai-pages/create/

Add a new AI-generated page to an existing website.

Request Body

{
  "slug": "pricing",
  "prompt": "Create a pricing page with three tiers: Starter, Growth, Scale",
  "title": "Pricing"
}

Response

{
  "success": true,
  "page": {
    "slug": "pricing",
    "title": "Pricing",
    "url": "https://mysite.escalateflow.com/pricing",
    "status": "success"
  }
}

Section Editing (AI-Powered)

POST /api/v1/projects/{project_id}/ai-pages/{page_slug}/sections/edit/

Edit a specific section of a page using AI. The AI regenerates just that section while maintaining page consistency.

Use home or empty string for homepage slug.

Request Body

{
  "section_id": "hero",
  "prompt": "Change the headline to 'Grow Your Business 10x' and make the CTA button green"
}

Response

{
  "success": true,
  "message": "Section \"hero\" updated successfully",
  "page_url": "https://mysite.escalateflow.com",
  "section_id": "hero"
}

Common Section IDs

Section IDDescription
heroMain hero/banner section
featuresFeatures or benefits
testimonialsCustomer testimonials
pricingPricing tables
ctaCall-to-action section
faqFAQ section
contactContact form section

Website Settings

GET /api/v1/projects/{project_id}/settings/

Retrieve current website settings.

PUT /api/v1/projects/{project_id}/settings/

Update website settings.

Request Body

{
  "name": "Updated Website Name",
  "primary_color": "#3B82F6",
  "head_scripts": "<script>...</script>",
  "footer_scripts": "<script>...</script>",
  "default_meta_title_suffix": " | My Brand",
  "default_meta_description": "Welcome to our website"
}

Settings Fields

FieldTypeDescription
head_scriptstextHTML/JS injected into <head> on all pages
footer_scriptstextHTML/JS injected before </body> on all pages
primary_colorstringBrand primary color (hex)
secondary_colorstringBrand secondary color (hex)
font_familystringDefault font
logo_urlURLBrand logo URL
favicon_urlURLFavicon URL (injected as <link rel="icon">)
default_languagestringDefault language code (e.g., "en", "nl-NL"). Sets <html lang> and og:locale.
default_meta_title_suffixstringAppended to page <title> (e.g., " | My Company")
default_meta_descriptionstringFallback meta description for pages without one
og_image_urlURLDefault Open Graph image for social sharing
robots_txttextCustom robots.txt content (may be overridden by CDN - see limitations)
sitemap_enabledbooleanAuto-generate XML sitemap
GET PUT /api/v1/projects/{project_id}/settings/style-kit/

Get or update the Style Kit (colors, typography, buttons). These generate CSS custom properties on every page.

Response / Request Body

{
  "success": true,
  "data": {
    "colors": {
      "primary": "#EF6A00",
      "secondary": "#3d3d3d",
      "accent": "#10b981",
      "background": "#ffffff"
    },
    "typography": {
      "heading_font": "Inter",
      "body_font": "Inter"
    },
    "buttons": {
      "primary": {
        "bg": "#EF6A00",
        "text": "#ffffff",
        "border_radius": "8px"
      }
    }
  }
}
POST /api/v1/projects/{project_id}/settings/style-kit/extract/

Extract a style kit from an existing website URL.

{"url": "https://example.com"}
GET /api/v1/projects/{project_id}/settings/seo/

Get SEO settings for a website.

Read-only. This endpoint only supports GET. To update SEO-related fields (default_meta_title_suffix, default_meta_description, og_image_url, favicon_url, default_language, robots_txt), use PUT /settings/ instead.

GET PUT /api/v1/projects/{project_id}/styles/

Get or update the full style configuration.

CSS Variables Generated

Your Style Kit generates these CSS custom properties on every page:

:root {
  --ef-color-primary: #EF6A00;
  --ef-color-secondary: #3d3d3d;
  --ef-color-accent: #10b981;
  --ef-color-background: #ffffff;
  --ef-font-heading: 'Inter', sans-serif;
  --ef-font-body: 'Inter', sans-serif;
  --ef-btn-primary-bg: #EF6A00;
  --ef-btn-primary-text: #ffffff;
  --ef-btn-primary-radius: 8px;
  --ef-container-max-width: 1200px;
  --ef-section-padding: 4rem 0;
}

Custom Domains

GET /api/v1/projects/{project_id}/domains/

List all custom domains for a website.

POST /api/v1/projects/{project_id}/domains/

Add a custom domain.

{"domain": "www.example.com"}
GET PUT DELETE /api/v1/projects/{project_id}/domains/{domain_id}/

Get, update, or delete a specific domain.

Website Pages (CMS)

GET /api/v1/projects/{project_id}/pages/

List all CMS pages.

POST /api/v1/projects/{project_id}/pages/

Create a new CMS page.

{
  "title": "About Us",
  "slug": "about",
  "html": "<section>...</section>",
  "status": "published",
  "show_in_menu": true,
  "is_homepage": false
}
GET PUT DELETE /api/v1/projects/{project_id}/pages/{page_id}/

Get, update, or delete a specific page.

POST /api/v1/projects/{project_id}/pages/reorder/

Reorder pages in the menu.

{"pages": [{"id": "uuid", "menu_order": 0}, {"id": "uuid", "menu_order": 1}]}

Layout: Navbar & Footer

GET PUT /api/v1/projects/{project_id}/navbar/

Get or update the navbar HTML.

{"html": "<nav class=\"...\">...</nav>"}
GET PUT /api/v1/projects/{project_id}/footer/

Get or update the footer HTML.

{"html": "<footer class=\"...\">...</footer>"}