Saltearse al contenido

Landing Pages

Esta página aún no está disponible en tu idioma.

The Landing Pages API exposes graph8’s clone-first page builder: clone any URL into a fully editable replica, modify text + images + design tokens via chat or direct edits, then publish to a Cloudflare Pages subdomain.

30-second start

List your landing pages:

Terminal window
curl 'https://be.graph8.com/api/v1/pages?status=published' \
-H "Authorization: Bearer $G8_API_KEY"

Quick reference

EndpointMethodPurpose
/pagesGETList landing pages
/pages/{id}GETGet a page (HTML, design tokens, image refs, version)
/pagesPOSTCreate from template / clone homepage / clone URL
/pages/{id}PATCHUpdate page (HTML diff, brand overrides)
/pages/{id}DELETEDelete
/pages/{id}/publishPOSTDeploy to Cloudflare Pages
/pages/{id}/versionsGETList version history
/pages/{id}/versions/{version_id}GETRestore / preview a previous version
/pages/{id}/chatPOSTSend a chat message that edits the page

Three ways to create

1. From a template

Terminal window
POST /api/v1/pages
Content-Type: application/json
{
"template": "demo" | "lead_magnet" | "product_launch" | "event" | "free_trial",
"title": "Q3 PLG Demo Page",
"campaign_id": "cmp_abc123"
}

Templates ship with sensible defaults — hero, value props, social proof, CTA. Customize via PATCH or the chat surface afterwards.

2. Clone your homepage

Terminal window
POST /api/v1/pages
{ "clone_source": "homepage", "title": "Cloned home" }

Pulls the org’s primary website via Firecrawl, extracts design tokens (colors, fonts, components), sanitizes the HTML, injects deterministic data-g8-id element IDs, and creates a fully editable replica. The clone preserves the visual identity so further pages live in the same brand system.

3. Clone from any URL

Terminal window
POST /api/v1/pages
{ "clone_source": "url", "url": "https://competitor.com/pricing", "title": "Competitor pricing analog" }

Same pipeline as homepage clone, but from an arbitrary URL. Useful for matching a competitor’s flow or replicating a hero page you like.

Edit via chat

Terminal window
POST /api/v1/pages/{page_id}/chat
{
"message": "Change the hero headline to 'Stop paying for stale data' and make the primary CTA pink."
}

Returns the diff applied to the page plus a new version. The chat surface is conversational — it can target specific elements (“the second testimonial”), apply brand-token changes, and add or remove sections.

Edit via PATCH

Terminal window
PATCH /api/v1/pages/{page_id}
{
"html": "<...full HTML...>",
"design_tokens": {
"colors": { "primary": "#9C73FF", "secondary": "#00CAEB" },
"fonts": { "heading": "Aeonik", "body": "Inter" }
}
}

Use this for programmatic edits — e.g. propagating a brand-token change across multiple pages.

Versions

Terminal window
GET /api/v1/pages/{id}/versions
# { data: [{ version_id, created_at, label, chat_message? }, ...] }
GET /api/v1/pages/{id}/versions/{version_id}
# Returns the full HTML snapshot of that version (for preview / restore)

Every chat edit creates a version. Restore by PATCHing the current page with a version’s HTML.

Publish

Terminal window
POST /api/v1/pages/{page_id}/publish

Deploys the current version to Cloudflare Pages at https://g8-lp-{org_sha256[:8]}.pages.dev/{slug}. Returns the public URL.

The CF Pages backend uses Direct Upload — no DNS / domain config needed. For a custom domain, attach via Cloudflare dashboard manually (custom-domain mapping API is not yet exposed).

List + delete

Terminal window
GET /api/v1/pages?campaign_id=cmp_abc123&status=published
DELETE /api/v1/pages/{page_id}

Credit costs

OperationCredits
List / get / versionsFree
Create (template)Free
Create (clone)Free — but Firecrawl + AI extraction may take 30-90 seconds
Edit via PATCHFree
Edit via chat1 per 1,000 AI tokens (the chat is LLM-powered)
PublishFree (Cloudflare Pages is bundled)

Errors

StatusCauseFix
401Missing or invalid Authorization: Bearer headerGet a key
402Out of credits (waterfall enrichment, AI generation, voice minutes)Top up in Settings → Billing, or switch to Platform
404Resource ID doesn’t existList first to verify the ID
422Validation error in request bodyInspect error.message + error.field in the response
429Rate limit (5 rps per org)Backoff per Retry-After header. See Rate Limits
5xxgraph8 errorRetry with exponential backoff (5s → 30s → 120s)

The full error envelope shape: { "error": { "code": "...", "message": "...", "field": "...", "request_id": "..." } }. Include the request_id in any support ticket. See Errors for the canonical reference.

See also