Skip to content

page update times out on valid PML; direct PATCH succeeds #8

Description

@jasich

Summary

cf page update times out while updating an existing funnel page with valid PML markup. The same page can be updated with a direct API PATCH /api/v2/pages/:id?expand[]=markup, and the result can then be verified successfully with cf page get.

This makes the CLI unreliable for the core "build/update a page from generated markup" workflow.

Environment

  • CLI: cf version v0.1.1-dirty
  • Workspace: Mountain Movers / mountainmovers
  • Command surface: cf page update
  • Help output currently shows: put /pages/{id}

Command That Failed

CF_CLI_CONFIG_DIR=tmp/clickfunnels-cli-config \
CF_CLI_WORKSPACE=mountainmovers \
tmp/clickfunnels-cli/cf page update \
  --id 24097563 \
  --query 'expand[]=markup' \
  --input tmp/clickfunnels-grid-scorecard-output/landing_a-input.json \
  -o json

Input body shape:

{
  "page": {
    "name": "Opt-In Landing A - Grid Scorecard",
    "markup": "<valid PML markup>",
    "seo_title": "Free AI Agent Opportunity Scorecard",
    "seo_description": "Score your workflows and find the AI agent worth building first.",
    "seo_index": false
  }
}

Actual Behavior

The CLI timed out waiting for headers:

ERROR

Put "https://mountainmovers.myclickfunnels.com/api/v2/pages/24097563?expand%5B%5D=markup": context deadline exceeded
(Client.Timeout exceeded while awaiting headers).

This reproduced more than once, including after removing AI-generated image prompts from the markup so the request was plain PML.

Fallback That Worked

Direct API PATCH worked for the same page/payload:

await fetch('https://mountainmovers.myclickfunnels.com/api/v2/pages/24097563?expand[]=markup', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
    'User-Agent': 'RobbyOpenClaw/1.0'
  },
  body: JSON.stringify(inputBody)
})

Then the CLI could verify the saved page:

CF_CLI_CONFIG_DIR=tmp/clickfunnels-cli-config \
CF_CLI_WORKSPACE=mountainmovers \
tmp/clickfunnels-cli/cf page get \
  --id 24097563 \
  --query 'expand[]=markup' \
  -o json

The updated public page also returned 200 and served the expected updated copy after CDN/cache propagation.

Expected Behavior

cf page update should reliably update valid page markup and return JSON, or fail with a precise API validation error.

Suspected Causes / Fix Directions

  • The CLI uses PUT /pages/{id} for page update, while the ClickFunnels page/funnel docs describe PATCH /api/v2/pages/:id for updating existing page markup.
  • The CLI request timeout may be too short for page-markup compilation.
  • If the API sometimes returns an HTML/502 response after saving the page server-side, the CLI should either retry verification or surface a clearer "save may have completed, verify with page get" message.

Why This Matters

The CF CLI is exactly the right interface for agent-built funnels and landing pages, but page updates need to be dependable. Right now agents have to fall back to raw API calls for the most important operation: updating an existing page with generated PML.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions