> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erdo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DeployPageAPI mirrors the erdo_deploy_page MCP tool. clone_from_page_id in


> the body switches it into clone mode — a new page copied server-side from an existing one, instead of content supplied here.




## OpenAPI

````yaml /api/openapi.json post /v1/pages
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-09-09'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/pages:
    post:
      summary: >
        DeployPageAPI mirrors the erdo_deploy_page MCP tool. clone_from_page_id
        in
      description: >
        the body switches it into clone mode — a new page copied server-side
        from an existing one, instead of content supplied here.
      operationId: POST:mcp.DeployPageAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                clone_from_page_id:
                  description: >
                    byte-identical server-side copy of the named page rather
                    than content the caller supplies. It is a parameter here,
                    not a separate endpoint/tool, for the same reason a
                    WHERE-clause variant is a parameter: cloning is deploying a
                    page whose content comes from another page.
                  title: >
                    CloneFromPageID switches the deploy into CLONE mode: the new
                    page is a
                  type: string
                css:
                  type: string
                dataset_slugs:
                  items:
                    type: string
                  type: array
                html:
                  type: string
                js:
                  type: string
                kv_slugs:
                  items:
                    type: string
                  type: array
                meta_description:
                  type: string
                meta_icon_asset_id:
                  description: >
                    knowledge attachment ids (from the org's Brand Style record)
                    the public shell renders as the browser-tab icon and the
                    share-card image. The page itself is an iframe, so this is
                    the only way its tab/preview can carry the customer's brand.
                    Optional; unset falls back to Erdo's icon and card.
                  title: >
                    MetaIconAssetID / MetaImageAssetID are the page's PUBLIC
                    branding: the
                  type: string
                meta_image_asset_id:
                  type: string
                meta_title:
                  description: >
                    title + description shown when the page is shared or
                    crawled) — distinct from Title, the internal library name.
                    Mirrors the create\_html\_artifact convention in
                    backend/agent/agents/helpers.go.
                  title: >
                    MetaTitle / MetaDescription are the page's PUBLIC SEO
                    metadata (OG/meta
                  type: string
                public:
                  type: boolean
                runtime:
                  type: string
                title:
                  description: >
                    required — in clone mode both must be absent. Content mode
                    still requires them; deployPageLogic enforces it with a
                    clear error.
                  title: >
                    Title and HTML carry json omitempty so the MCP schema does
                    not mark them
                  type: string
                writable_dataset_slugs:
                  description: >
                    named-KV-store access that erdo.insertRows and erdo.kv.set
                    need. Without them those writes 403 ("this page has no write
                    access"). dataset\_slugs is read-only; these are the write
                    side.
                  items:
                    type: string
                  title: >
                    WritableDatasetSlugs / KVSlugs / WritableKVSlugs grant the
                    write and
                  type: array
                writable_kv_slugs:
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  cloned_pipelines:
                    items:
                      $ref: '#/components/schemas/mcp.ClonedPipelineSummary'
                    type: array
                  id:
                    type: string
                  meta_description:
                    type: string
                  meta_icon_asset_id:
                    description: |
                      ids (favicon / share image), nil when unset.
                    title: >
                      MetaIconAssetID / MetaImageAssetID echo the page's
                      branding attachment
                    type: string
                  meta_image_asset_id:
                    type: string
                  meta_title:
                    description: >
                      (nil when unset), so a caller can confirm what it just
                      deployed/updated without a separate read.
                    title: >
                      MetaTitle / MetaDescription echo the page's current public
                      SEO metadata
                    type: string
                  notes:
                    items:
                      type: string
                    type: array
                  public:
                    type: boolean
                  public_url:
                    type: string
                  review:
                    $ref: '#/components/schemas/agents.AgentArtifactReview'
                  rewrites:
                    additionalProperties:
                      type: string
                    type: object
                  source_page_id:
                    description: >
                      clone\_from\_page\_id deploy: the page the copy was made
                      from, the lead-capture pipelines duplicated onto it, every
                      id substitution applied to the copied content, and
                      anything the caller still has to act on.
                    title: >
                      SourcePageID / ClonedPipelines / Rewrites / Notes are set
                      only on a
                    type: string
                  thread_id:
                    type: string
                  title:
                    type: string
                  url:
                    description: >
                      share link and is only present while the page is public.
                      Use these values verbatim — hosts differ across
                      prod/staging/local.
                    title: >
                      URL is the authenticated editor view; PublicURL is the
                      visitor-facing
                    type: string
                  validation:
                    $ref: '#/components/schemas/types.ArtifactValidationResult'
                  warning:
                    description: >
                      successful content deploy/update). The page exists and is
                      usable; the calling agent should surface this to the user
                      and retry the failing op.
                    title: >
                      Warning carries non-fatal issues (e.g. visibility update
                      failed after a
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.ClonedPipelineSummary:
      description: >
        the copy: source\_id is the pipeline the original page posts to, id the
        copy's own pipeline. purpose/slug identify it the way the rest of the
        pipeline surface does.
      properties:
        id:
          type: string
        purpose:
          type: string
        slug:
          type: string
        source_id:
          type: string
      title: >
        ClonedPipelineSummary reports one lead-capture event pipeline duplicated
        onto
      type: object
    agents.AgentArtifactReview:
      description: >
        request\_review. Structured rather than prose so the tool result can
        carry it without a second formatting layer inventing its own vocabulary.
      properties:
        issues:
          items:
            $ref: '#/components/schemas/agents.ArtifactCriticIssue'
          type: array
        judges:
          items:
            type: string
          type: array
        lighthouse:
          $ref: '#/components/schemas/types.PageReviewLighthouse'
        reason:
          type: string
        reviewed:
          type: boolean
        summary:
          type: string
      title: >
        AgentArtifactReview is what an agent gets back when it asks for a review
        with
      type: object
    types.ArtifactValidationResult:
      description: >
        action callers can reference it without importing the validator
        implementation.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/types.ArtifactValidationError'
          type: array
        valid:
          type: boolean
      title: >
        ArtifactValidationResult lives in this package so both the private API
        layer and
      type: object
    agents.ArtifactCriticIssue:
      properties:
        category:
          title: >
            brand | technical | conversion | copy | responsive | accessibility |
            compliance
          type: string
        description:
          title: |
            what's wrong, quoting the offending markup
          type: string
        id:
          title: |
            e.g. "brand-1", "technical-2"
          type: string
        judge_slug:
          description: >
            flat merged result fans back into per-judge verdicts
            (SplitCriticResultByJudge). Empty on the single-rubric path, where
            the call itself IS one judge.
          title: >
            JudgeSlug tags a MERGED-mode issue with the rubric it was raised
            against, so a
          type: string
        severity:
          title: |
            low | medium | high | critical
          type: string
        suggestion:
          title: |
            the concrete change to make
          type: string
      title: |
        ArtifactCriticIssue is one fixable problem found in the page.
      type: object
    types.PageReviewLighthouse:
      description: >
        the PageSpeed Insights API on the mobile strategy. Each is 0..100
        (Lighthouse's own 0..1 category score ×100, rounded). Optional by
        design: absent when PSI is unavailable, rate-limited, or times out — a
        missing Lighthouse never fails the review. FetchedAt stamps when the
        measurement was taken. Each category is a POINTER because Lighthouse
        itself reports null for a category whose lab run failed (observed live:
        performance=null on a page the other three categories scored fine) — a
        non-pointer int rendered that null as a fake catastrophic 0. An absent
        category is absent, never zero.
      properties:
        accessibility:
          format: int64
          type: integer
        best_practices:
          format: int64
          type: integer
        fetched_at:
          format: date-time
          type: string
        performance:
          format: int64
          type: integer
        seo:
          format: int64
          type: integer
      title: >
        PageReviewLighthouse is the page's real Google Lighthouse scores,
        fetched from
      type: object
    types.ArtifactValidationError:
      properties:
        column:
          format: int64
          type: integer
        context:
          description: |
            fix the error in place without reading the whole artifact back.
          title: >
            Context is a small numbered source snippet around Line so the agent
            can
          type: string
        field:
          title: |
            "html" | "js" | "css" | "content"
          type: string
        line:
          format: int64
          type: integer
        message:
          type: string
        severity:
          title: |
            "error" | "warning"
          type: string
      title: >
        ArtifactValidationError mirrors the internal validator's output for the
        external

        API.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````