{
  "openapi": "3.0.3",
  "info": {
    "title": "Atomicat API",
    "version": "1.0.0",
    "description": "Account-owned HTTPS API for pages, sites, funnels, videos, products, leads, and webhooks.\n\nBase URL: https://automation.atomicat-api.com/api/automation/v1\n\nSend Authorization: Bearer at_live_... on every call except GET /openapi.json. Keys are created in the Atomicat app under Settings, then API Keys. A key is shown once.\n\nList and search responses are JSON arrays. There is no { data: [] } envelope.\n\nRate limit: 5,000 requests per API key every 10 minutes. A second limit of 60,000 requests per IP every 15 minutes applies to the whole host.\n\nThis document does not include owner-only key management or internal event routes.",
    "contact": {
      "name": "Atomicat",
      "url": "https://atomicat.com.br"
    }
  },
  "servers": [
    {
      "url": "https://automation.atomicat-api.com/api/automation/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "Identify the key and download this spec."
    },
    {
      "name": "Projects",
      "description": "Group pages, sites, funnels, and products."
    },
    {
      "name": "Sites",
      "description": "Hosting targets for published pages."
    },
    {
      "name": "Pages",
      "description": "Create, edit, publish, and delete pages."
    },
    {
      "name": "Builder",
      "description": "Read and edit the page builder tree."
    },
    {
      "name": "Quizzes",
      "description": "Quiz pages and quiz records."
    },
    {
      "name": "Funnels",
      "description": "Ordered page flows."
    },
    {
      "name": "Videos",
      "description": "List videos and update player settings."
    },
    {
      "name": "Products",
      "description": "Offers used on pages."
    },
    {
      "name": "Leads",
      "description": "Form and quiz submissions."
    },
    {
      "name": "Analytics",
      "description": "Counts owned by the account."
    },
    {
      "name": "Webhooks",
      "description": "HTTPS notifications for account events."
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "at_live",
        "description": "API key created in Atomicat Settings. Send the full key, including the at_live_ prefix. Do not send the key prefix alone."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Stable machine code, such as invalid_request or page_not_found."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation."
          }
        }
      },
      "Deleted": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "true when the delete succeeded."
          },
          "id": {
            "type": "string",
            "description": "Deleted record id."
          },
          "deleted": {
            "type": "boolean",
            "description": "true when the record was removed."
          }
        }
      },
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Account id."
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Account email."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "plan": {
            "nullable": true,
            "description": "Plan name when the account has one."
          },
          "workspace_id": {
            "type": "string",
            "description": "Same value as id."
          }
        }
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Project id."
          },
          "name": {
            "type": "string",
            "description": "Project name."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Project description."
          },
          "context": {
            "type": "string",
            "nullable": true,
            "description": "Brand brief. Present on create and update responses."
          },
          "active": {
            "type": "boolean",
            "description": "false when the project is inactive."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          }
        }
      },
      "ProjectCreate": {
        "type": "object",
        "required": [
          "name",
          "description",
          "context"
        ],
        "example": {
          "name": "Spring campaign",
          "description": "Campaign assets for the spring launch across offers and traffic sources.",
          "context": "Spring campaign sells a 6-week fitness program for busy professionals. The brand voice is direct and encouraging. The offer is a starter kit plus one coaching call. Pages should speak to people who started short workouts and quit, explain the weekly plan and the support included, and state the refund window before the call to action."
        },
        "properties": {
          "name": {
            "type": "string",
            "description": "Project name.",
            "example": "Spring campaign"
          },
          "description": {
            "type": "string",
            "minLength": 50,
            "example": "Campaign assets for the spring launch across offers and traffic sources.",
            "description": "At least 50 characters."
          },
          "context": {
            "type": "string",
            "minLength": 200,
            "example": "Spring campaign sells a 6-week fitness program for busy professionals. The brand voice is direct and encouraging. The offer is a starter kit plus one coaching call. Pages should speak to people who started short workouts and quit, explain the weekly plan and the support included, and state the refund window before the call to action.",
            "description": "At least 200 characters describing the brand and offer."
          }
        }
      },
      "ProjectUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "New name."
          },
          "description": {
            "type": "string",
            "description": "New description."
          },
          "context": {
            "type": "string",
            "description": "New brand brief."
          }
        }
      },
      "Site": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Site id."
          },
          "name": {
            "type": "string",
            "description": "Display name, often the domain."
          },
          "site_name": {
            "type": "string",
            "nullable": true,
            "description": "Name stored on the site."
          },
          "domain": {
            "type": "string",
            "nullable": true,
            "description": "Public domain."
          },
          "custom_domain": {
            "type": "string",
            "nullable": true,
            "description": "Custom domain, when connected."
          },
          "atomic_domain": {
            "type": "string",
            "nullable": true,
            "description": "Atomicat-provided domain."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Site status when present."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          }
        }
      },
      "SiteCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Site id."
          },
          "site_id": {
            "type": "string",
            "description": "Same value as id."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Site name."
          },
          "atomic_domain": {
            "type": "string",
            "nullable": true,
            "description": "Atomicat domain."
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Public URL."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "custom_domain_instructions": {
            "nullable": true,
            "description": "DNS instructions for a custom domain, when returned."
          }
        }
      },
      "SiteCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Site name."
          },
          "description": {
            "type": "string",
            "description": "Site description."
          },
          "project_id": {
            "type": "string",
            "description": "Project to attach the site to."
          }
        }
      },
      "Page": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "name": {
            "type": "string",
            "description": "Display name. Includes the site name in parentheses when the page is on a site."
          },
          "page_name": {
            "type": "string",
            "description": "Page name without the site suffix."
          },
          "status": {
            "type": "string",
            "description": "published or draft."
          },
          "is_quiz": {
            "type": "boolean",
            "description": "true when the page is a quiz."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "site_id": {
            "type": "string",
            "nullable": true,
            "description": "Site id once the page is attached to a site."
          },
          "site_name": {
            "type": "string",
            "nullable": true,
            "description": "Site name."
          },
          "domain": {
            "type": "string",
            "nullable": true,
            "description": "Published domain."
          },
          "slug": {
            "type": "string",
            "nullable": true,
            "description": "Path on the site. Empty means the site root."
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Public URL after publish."
          },
          "edit_url": {
            "type": "string",
            "description": "Link to the page in the Atomicat builder."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "published_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 publish time."
          }
        }
      },
      "PageCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Page name."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          }
        }
      },
      "PageFromTemplate": {
        "type": "object",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "Template id from GET /templates."
          },
          "name": {
            "type": "string",
            "description": "Name for the new page."
          },
          "site_id": {
            "type": "string",
            "description": "Site to attach, if any."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          }
        }
      },
      "PageDuplicate": {
        "type": "object",
        "required": [
          "page_id"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page to copy."
          },
          "new_name": {
            "type": "string",
            "description": "Name for the copy."
          }
        }
      },
      "PageDuplicateResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "New page id."
          },
          "name": {
            "type": "string",
            "description": "New page name."
          },
          "page_name": {
            "type": "string",
            "description": "New page name."
          },
          "source_page_id": {
            "type": "string",
            "description": "Id of the page that was copied."
          },
          "edit_url": {
            "type": "string",
            "description": "Builder URL."
          }
        }
      },
      "PageMetadata": {
        "type": "object",
        "required": [
          "page_id"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "name": {
            "type": "string",
            "description": "New name."
          },
          "project_id": {
            "type": "string",
            "description": "New project id."
          },
          "tags": {
            "description": "Array of tag names, or a comma-separated string."
          },
          "product_label": {
            "type": "string",
            "description": "Product label shown on the page. produkt is accepted as an alias."
          }
        }
      },
      "PageMetadataResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "updated": {
            "type": "boolean",
            "description": "true when the update was saved."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Name after the update."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id after the update."
          },
          "tags": {
            "nullable": true,
            "description": "Tags after the update."
          },
          "product_label": {
            "type": "string",
            "nullable": true,
            "description": "Product label after the update."
          }
        }
      },
      "PageIdBody": {
        "type": "object",
        "required": [
          "page_id"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          }
        }
      },
      "PageContentUpdate": {
        "type": "object",
        "required": [
          "page_id",
          "updates"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "updates": {
            "type": "object",
            "additionalProperties": true,
            "description": "Map of content-field keys to new values. A JSON string is also accepted."
          }
        }
      },
      "PageContentResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "success": {
            "type": "boolean",
            "description": "true when the request completed."
          },
          "applied_count": {
            "type": "number",
            "description": "Number of fields updated."
          },
          "changed_section_count": {
            "type": "number",
            "description": "Number of sections rewritten."
          },
          "missing_count": {
            "type": "number",
            "description": "Number of keys that were not found."
          },
          "applied": {
            "type": "string",
            "description": "JSON string of applied updates."
          },
          "missing": {
            "type": "string",
            "description": "JSON string of keys that were not applied."
          }
        }
      },
      "PageVariables": {
        "type": "object",
        "required": [
          "page_id",
          "variables"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "variables": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Placeholder name to replacement text. A JSON string is also accepted."
          }
        }
      },
      "PageVariablesResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "success": {
            "type": "boolean",
            "description": "true when the request completed."
          },
          "replacement_count": {
            "type": "number",
            "description": "Number of replacements made."
          },
          "changed_section_count": {
            "type": "number",
            "description": "Sections rewritten."
          },
          "replaced_variables": {
            "type": "string",
            "description": "JSON string of variable names that were replaced."
          },
          "remaining_variables": {
            "type": "string",
            "description": "JSON string of variables still on the page."
          },
          "remaining_variable_count": {
            "type": "number",
            "description": "Count of remaining variables."
          }
        }
      },
      "PageValidation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "ready_to_publish": {
            "type": "boolean",
            "description": "true when no issues were found."
          },
          "issue_count": {
            "type": "number",
            "description": "Number of issues."
          },
          "issues": {
            "type": "string",
            "description": "JSON string of issue objects."
          },
          "field_count": {
            "type": "number",
            "description": "Editable field count."
          },
          "remaining_variable_count": {
            "type": "number",
            "description": "Variables still on the page."
          },
          "remaining_variables": {
            "type": "string",
            "description": "JSON string of remaining variable names."
          }
        }
      },
      "PagePublish": {
        "type": "object",
        "required": [
          "page_id",
          "site_id"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "site_id": {
            "type": "string",
            "description": "Site that will host the page."
          },
          "slug": {
            "type": "string",
            "description": "Path on the site. Omit or send an empty string for the site root."
          }
        }
      },
      "PagePublishResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "site_id": {
            "type": "string",
            "description": "Site id."
          },
          "success": {
            "type": "boolean",
            "description": "true when publish succeeded."
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Public URL."
          },
          "domain": {
            "type": "string",
            "nullable": true,
            "description": "Published domain."
          },
          "slug": {
            "type": "string",
            "description": "Published path."
          },
          "revision_saved": {
            "type": "boolean",
            "description": "true when a revision was stored."
          },
          "revision_warning": {
            "type": "string",
            "nullable": true,
            "description": "Warning when the revision could not be stored."
          }
        }
      },
      "PageDelay": {
        "type": "object",
        "required": [
          "page_id"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "time": {
            "type": "number",
            "description": "Reveal delay in seconds."
          },
          "sync_with_video": {
            "type": "boolean",
            "description": "Reveal in sync with a video."
          },
          "scroll_into_view": {
            "type": "boolean",
            "description": "Scroll the delayed section into view."
          },
          "video_node_id": {
            "type": "string",
            "description": "Builder node id of the video to sync with."
          }
        }
      },
      "PageDelayResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "updated": {
            "type": "boolean",
            "description": "true when the delay was saved."
          },
          "delay": {
            "type": "object",
            "additionalProperties": true,
            "description": "Saved delay settings."
          }
        }
      },
      "BuilderSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "builder": {
            "type": "object",
            "additionalProperties": true,
            "description": "Builder summary, including the section tree when include_tree is true."
          }
        }
      },
      "BuilderNode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Node id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "node_id": {
            "type": "string",
            "description": "Node id."
          },
          "path": {
            "type": "string",
            "nullable": true,
            "description": "Location of the node in the tree."
          },
          "summary": {
            "nullable": true,
            "description": "Short node summary when the builder returns one."
          },
          "node": {
            "type": "object",
            "additionalProperties": true,
            "description": "The node object."
          }
        }
      },
      "BuilderNodeFields": {
        "type": "object",
        "required": [
          "page_id",
          "node_id",
          "updates"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "node_id": {
            "type": "string",
            "description": "Node id."
          },
          "node_type": {
            "type": "string",
            "description": "Optional node type hint."
          },
          "updates": {
            "type": "object",
            "description": "Must include misc, style, or both.",
            "properties": {
              "misc": {
                "type": "object",
                "additionalProperties": true
              },
              "style": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "BuilderNodeUpdate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Node id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "node_id": {
            "type": "string",
            "description": "Node id."
          },
          "updated": {
            "type": "boolean",
            "description": "true when the node was saved."
          },
          "path": {
            "type": "string",
            "nullable": true,
            "description": "Node path."
          }
        }
      },
      "BuilderNodeReplace": {
        "type": "object",
        "required": [
          "page_id",
          "node_id",
          "node"
        ],
        "properties": {
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "node_id": {
            "type": "string",
            "description": "Node id to replace."
          },
          "node": {
            "type": "object",
            "additionalProperties": true,
            "description": "Complete replacement node. A JSON string is also accepted."
          }
        }
      },
      "BuilderNodeReplaceResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Node id."
          },
          "page_id": {
            "type": "string",
            "description": "Page id."
          },
          "node_id": {
            "type": "string",
            "description": "Node id."
          },
          "updated": {
            "type": "boolean",
            "description": "true when the node was replaced."
          },
          "path": {
            "type": "string",
            "nullable": true,
            "description": "Node path."
          },
          "builder_warnings": {
            "type": "string",
            "description": "JSON string of builder warnings."
          }
        }
      },
      "ContentMap": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Page id."
          },
          "page_id": {
            "type": "string",
            "nullable": true,
            "description": "Page id."
          },
          "page_name": {
            "type": "string",
            "nullable": true,
            "description": "Page name."
          },
          "field_count": {
            "type": "number",
            "description": "Number of editable fields."
          },
          "variable_count": {
            "type": "number",
            "description": "Number of template variables."
          },
          "variables": {
            "type": "string",
            "description": "JSON string of variable names."
          },
          "fields": {
            "type": "string",
            "description": "JSON string of editable fields."
          },
          "ready_for_variable_replacement": {
            "type": "boolean",
            "description": "true when the page still has variables."
          }
        }
      },
      "Template": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Template id."
          },
          "name": {
            "type": "string",
            "description": "Template name."
          },
          "template_name": {
            "type": "string",
            "description": "Same as name."
          },
          "category": {
            "type": "string",
            "nullable": true,
            "description": "Template category."
          },
          "type": {
            "type": "string",
            "description": "Template type, usually page."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Template description."
          },
          "preview_url": {
            "type": "string",
            "nullable": true,
            "description": "Preview URL."
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "Thumbnail URL."
          }
        }
      },
      "Quiz": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Quiz id (qid)."
          },
          "name": {
            "type": "string",
            "description": "Display name, with the page name when known."
          },
          "quiz_name": {
            "type": "string",
            "description": "Quiz name."
          },
          "page_id": {
            "type": "string",
            "nullable": true,
            "description": "Page that hosts the quiz."
          },
          "page_name": {
            "type": "string",
            "nullable": true,
            "description": "Host page name."
          },
          "site_id": {
            "type": "string",
            "nullable": true,
            "description": "Site id."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          }
        }
      },
      "QuizPage": {
        "type": "object",
        "description": "A newly created quiz page. id is the page id. Later list calls return the quiz qid, which can differ.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Page id."
          },
          "quiz_id": {
            "type": "string",
            "description": "Same as id on create."
          },
          "is_quiz": {
            "type": "boolean",
            "description": "Always true."
          },
          "name": {
            "type": "string",
            "description": "Page name."
          },
          "page_name": {
            "type": "string",
            "description": "Page name."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "site_id": {
            "type": "string",
            "nullable": true,
            "description": "Site id."
          },
          "edit_url": {
            "type": "string",
            "description": "Builder URL."
          }
        }
      },
      "QuizCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Quiz page name."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          },
          "site_id": {
            "type": "string",
            "description": "Site id."
          }
        }
      },
      "Funnel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Funnel id."
          },
          "name": {
            "type": "string",
            "description": "Funnel name."
          },
          "site_id": {
            "type": "string",
            "nullable": true,
            "description": "Site id."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Funnel status."
          },
          "pages": {
            "type": "array",
            "items": {},
            "description": "Page ids or page step objects stored on the funnel."
          },
          "page_ids": {
            "type": "string",
            "description": "Comma-separated page ids when pages is an array of ids."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Step objects when the funnel stores them."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          }
        }
      },
      "FunnelPage": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "description": "Existing page id."
          },
          "url": {
            "type": "string",
            "description": "External URL, used when there is no pageId."
          },
          "pageType": {
            "type": "string",
            "description": "Step type, such as presell, sales, or thankyou."
          }
        }
      },
      "FunnelCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Funnel name."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FunnelPage"
            },
            "description": "Steps. Each item needs pageId or url."
          }
        }
      },
      "FunnelUpdate": {
        "type": "object",
        "required": [
          "funnel_id"
        ],
        "properties": {
          "funnel_id": {
            "type": "string",
            "description": "Funnel id."
          },
          "name": {
            "type": "string",
            "description": "New name."
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FunnelPage"
            }
          }
        }
      },
      "Video": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Video id."
          },
          "video_id": {
            "type": "string",
            "nullable": true,
            "description": "Same as id."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Video name."
          },
          "title": {
            "type": "string",
            "nullable": true,
            "description": "Player title."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Encoding or playback status."
          },
          "duration": {
            "nullable": true,
            "description": "Duration in seconds when the player returns it."
          },
          "thumbnail_url": {
            "type": "string",
            "nullable": true,
            "description": "Thumbnail URL."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "Created time."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "Updated time."
          }
        }
      },
      "VideoUpdate": {
        "type": "object",
        "required": [
          "video_id"
        ],
        "properties": {
          "video_id": {
            "type": "string",
            "description": "Video id."
          },
          "name": {
            "type": "string",
            "description": "Library name."
          },
          "title": {
            "type": "string",
            "description": "Player title."
          },
          "language": {
            "type": "string",
            "description": "Player language."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          },
          "primary_color": {
            "type": "string",
            "description": "Player accent color."
          },
          "controls": {
            "type": "boolean",
            "description": "Show player controls."
          },
          "autoplay": {
            "type": "boolean",
            "description": "Start playback automatically."
          },
          "muted": {
            "type": "boolean",
            "description": "Start muted."
          },
          "loop": {
            "type": "boolean",
            "description": "Loop playback."
          }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Product id."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          },
          "type": {
            "type": "string",
            "description": "simple or bundle."
          },
          "sku": {
            "type": "string",
            "nullable": true,
            "description": "SKU."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description."
          },
          "image": {
            "type": "string",
            "nullable": true,
            "description": "Image URL."
          },
          "show_full_product": {
            "type": "boolean",
            "description": "Show the full product block."
          },
          "price": {
            "type": "number",
            "description": "Price."
          },
          "compare_price": {
            "type": "number",
            "description": "Compare-at price."
          },
          "rating": {
            "type": "string",
            "nullable": true,
            "description": "Rating label."
          },
          "rating_count": {
            "type": "string",
            "nullable": true,
            "description": "Rating count label."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "cta_text": {
            "type": "string",
            "nullable": true,
            "description": "Button label."
          },
          "cta_url": {
            "type": "string",
            "nullable": true,
            "description": "Button URL."
          },
          "cta_target": {
            "type": "boolean",
            "description": "Open the button URL in a new tab."
          },
          "use_single_cta_link": {
            "type": "boolean",
            "description": "Use one call-to-action link."
          },
          "bundle_discount": {
            "type": "number",
            "description": "Bundle discount."
          },
          "bundle_item_count": {
            "type": "number",
            "description": "Number of bundle items."
          },
          "tiers_enabled": {
            "type": "boolean",
            "description": "Quantity tiers are enabled."
          },
          "subscription_enabled": {
            "type": "boolean",
            "description": "Subscription option is enabled."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          }
        }
      },
      "ProductWrite": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Product name."
          },
          "type": {
            "type": "string",
            "enum": [
              "simple",
              "bundle"
            ],
            "description": "Defaults to simple."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          },
          "sku": {
            "type": "string",
            "description": "SKU."
          },
          "description": {
            "type": "string",
            "description": "Description."
          },
          "image": {
            "type": "string",
            "description": "Image URL."
          },
          "price": {
            "type": "number",
            "description": "Price."
          },
          "compare_price": {
            "type": "number",
            "description": "Compare-at price."
          },
          "cta_text": {
            "type": "string",
            "description": "Button label."
          },
          "cta_url": {
            "type": "string",
            "description": "Button URL."
          },
          "show_full_product": {
            "type": "boolean",
            "description": "Show the full product block."
          },
          "cta_target": {
            "type": "boolean",
            "description": "Open the URL in a new tab."
          },
          "use_single_cta_link": {
            "type": "boolean",
            "description": "Use one call-to-action link."
          },
          "rating": {
            "type": "string",
            "description": "Rating label. Defaults to 4.9 when sent empty."
          },
          "rating_count": {
            "type": "string",
            "description": "Rating count label."
          },
          "trust_badges_json": {
            "description": "Array of badge labels, or a JSON string."
          },
          "variants_json": {
            "description": "Array of { id, name, image }, or a JSON string."
          },
          "tiers_enabled": {
            "type": "boolean",
            "description": "Enable quantity tiers."
          },
          "tiers_json": {
            "description": "Tier objects, or a JSON string."
          },
          "bundle_items_json": {
            "description": "Required when type is bundle."
          },
          "bundle_discount": {
            "type": "number",
            "description": "Bundle discount."
          },
          "subscription_json": {
            "description": "Object with enabled, discountPercent, and benefits."
          }
        }
      },
      "ProductUpdate": {
        "type": "object",
        "required": [
          "product_id"
        ],
        "properties": {
          "product_id": {
            "type": "string",
            "description": "Product id."
          },
          "name": {
            "type": "string",
            "description": "New name."
          },
          "type": {
            "type": "string",
            "enum": [
              "simple",
              "bundle"
            ]
          },
          "sku": {
            "type": "string",
            "description": "SKU."
          },
          "description": {
            "type": "string",
            "description": "Description."
          },
          "image": {
            "type": "string",
            "description": "Image URL."
          },
          "price": {
            "type": "number",
            "description": "Price."
          },
          "compare_price": {
            "type": "number",
            "description": "Compare-at price."
          },
          "project_id": {
            "type": "string",
            "description": "Project id."
          },
          "cta_text": {
            "type": "string",
            "description": "Button label."
          },
          "cta_url": {
            "type": "string",
            "description": "Button URL."
          },
          "show_full_product": {
            "type": "boolean",
            "description": "Show the full product block."
          },
          "cta_target": {
            "type": "boolean",
            "description": "Open the URL in a new tab."
          },
          "use_single_cta_link": {
            "type": "boolean",
            "description": "Use one call-to-action link."
          },
          "rating": {
            "type": "string",
            "description": "Rating label."
          },
          "rating_count": {
            "type": "string",
            "description": "Rating count label."
          },
          "trust_badges_json": {
            "description": "Badge labels."
          },
          "variants_json": {
            "description": "Variant objects."
          },
          "tiers_enabled": {
            "type": "boolean",
            "description": "Enable quantity tiers."
          },
          "tiers_json": {
            "description": "Tier objects."
          },
          "bundle_items_json": {
            "description": "Bundle items."
          },
          "bundle_discount": {
            "type": "number",
            "description": "Bundle discount."
          },
          "subscription_json": {
            "description": "Subscription settings."
          }
        }
      },
      "Lead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Lead id."
          },
          "lead_id": {
            "type": "string",
            "description": "Same as id."
          },
          "type": {
            "type": "string",
            "description": "form or quiz."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Contact name."
          },
          "first_name": {
            "type": "string",
            "nullable": true,
            "description": "First name."
          },
          "last_name": {
            "type": "string",
            "nullable": true,
            "description": "Last name."
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Email."
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "description": "Phone."
          },
          "form_id": {
            "type": "string",
            "nullable": true,
            "description": "Form id. Present on form leads."
          },
          "form_name": {
            "type": "string",
            "nullable": true,
            "description": "Form name."
          },
          "quiz_id": {
            "type": "string",
            "nullable": true,
            "description": "Quiz id. Present on quiz leads."
          },
          "quiz_name": {
            "type": "string",
            "nullable": true,
            "description": "Quiz name."
          },
          "page_id": {
            "type": "string",
            "nullable": true,
            "description": "Page id."
          },
          "page_url": {
            "type": "string",
            "nullable": true,
            "description": "Page URL."
          },
          "project_id": {
            "type": "string",
            "nullable": true,
            "description": "Project id."
          },
          "site_id": {
            "type": "string",
            "nullable": true,
            "description": "Site id."
          },
          "abandoned": {
            "type": "boolean",
            "description": "true when a form lead was abandoned."
          },
          "is_completed": {
            "type": "boolean",
            "description": "Present on quiz leads."
          },
          "fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw form fields."
          },
          "answers": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw quiz answers."
          },
          "created_at": {
            "type": "string",
            "nullable": true,
            "description": "ISO-8601 timestamp."
          }
        }
      },
      "Analytics": {
        "type": "object",
        "properties": {
          "pages": {
            "type": "number",
            "description": "Page count."
          },
          "sites": {
            "type": "number",
            "description": "Site count."
          },
          "funnels": {
            "type": "number",
            "description": "Funnel count."
          },
          "products": {
            "type": "number",
            "description": "Product count."
          },
          "projects": {
            "type": "number",
            "description": "Project count."
          },
          "form_leads": {
            "type": "number",
            "description": "Form lead count."
          },
          "quiz_leads": {
            "type": "number",
            "description": "Quiz lead count."
          }
        }
      },
      "HookCreate": {
        "type": "object",
        "required": [
          "target_url",
          "event_type"
        ],
        "properties": {
          "target_url": {
            "type": "string",
            "format": "uri",
            "description": "Public HTTPS URL that receives the event."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "form_lead.created",
              "quiz_lead.created",
              "page.published",
              "page.created",
              "product.created",
              "funnel.created",
              "site.created",
              "project.created"
            ],
            "description": "Event to subscribe to."
          },
          "filters": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional filter object stored with the subscription."
          }
        }
      },
      "HookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Subscription id. Send this to DELETE /hooks/{subscriptionId}."
          },
          "event_type": {
            "type": "string",
            "description": "Subscribed event."
          },
          "active": {
            "type": "boolean",
            "description": "true until the subscription is disabled."
          },
          "created_at": {
            "type": "string",
            "description": "ISO-8601 timestamp."
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "getAccount",
        "tags": [
          "Account"
        ],
        "summary": "Get the authenticated account",
        "description": "Returns the Atomicat account that owns the API key. The workspace id is the same as the account id.\n\nRequired scope: account:read.",
        "responses": {
          "200": {
            "description": "The account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "example": {
                  "id": "user_123",
                  "email": "owner@example.com",
                  "name": "Ada Lovelace",
                  "plan": "pro",
                  "workspace_id": "user_123"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiDocument",
        "tags": [
          "Account"
        ],
        "summary": "Download the OpenAPI document",
        "description": "Public document. No API key is required. This is the same spec the docs site is built from.",
        "responses": {
          "200": {
            "description": "OpenAPI 3.0 JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/projects": {
      "get": {
        "operationId": "listProjects",
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "description": "Projects group pages, sites, funnels, and products.\n\nRequired scope: projects:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based page index. The API returns limit records starting at page × limit."
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                },
                "example": [
                  {
                    "id": "project_123",
                    "name": "Spring campaign",
                    "description": "Campaign assets for the spring launch across offers and traffic sources.",
                    "active": true,
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createProject",
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "name is required. description must be at least 50 characters. context must be at least 200 characters. A paid plan is required.\n\nRequired scope: projects:write.",
        "responses": {
          "201": {
            "description": "The created project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                },
                "example": {
                  "id": "project_123",
                  "name": "Spring campaign",
                  "description": "Campaign assets for the spring launch across offers and traffic sources.",
                  "active": true,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z",
                  "context": "Spring campaign sells a 6-week fitness program for busy professionals. The brand voice is direct and encouraging. The offer is a starter kit plus one coaching call. Pages should speak to people who started short workouts and quit, explain the weekly plan and the support included, and state the refund window before the call to action."
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/projects": {
      "get": {
        "operationId": "searchProjects",
        "tags": [
          "Projects"
        ],
        "summary": "Search projects",
        "description": "Pass project_id to fetch one project, or query to match name and description. Returns an array, including when one id is requested.\n\nRequired scope: projects:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Exact project id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                },
                "example": [
                  {
                    "id": "project_123",
                    "name": "Spring campaign",
                    "description": "Campaign assets for the spring launch across offers and traffic sources.",
                    "active": true,
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/projects/{projectId}": {
      "get": {
        "operationId": "getProject",
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "description": "Required scope: projects:read.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "Project id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                },
                "example": {
                  "id": "project_123",
                  "name": "Spring campaign",
                  "description": "Campaign assets for the spring launch across offers and traffic sources.",
                  "active": true,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateProject",
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "Send only the fields you want to change.\n\nRequired scope: projects:write.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "Project id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                },
                "example": {
                  "id": "project_123",
                  "name": "Spring campaign",
                  "description": "Campaign assets for the spring launch across offers and traffic sources.",
                  "active": true,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteProject",
        "tags": [
          "Projects"
        ],
        "summary": "Delete an unused project",
        "description": "Deletes the project only when no page, product, site, or funnel still references it. Otherwise the API returns 409 project_in_use.\n\nRequired scope: projects:write.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "Project id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The record was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                },
                "example": {
                  "success": true,
                  "id": "record_123",
                  "deleted": true
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The record cannot be deleted because other records still use it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/sites": {
      "get": {
        "operationId": "listSites",
        "tags": [
          "Sites"
        ],
        "summary": "List sites",
        "description": "A site is the host a page is published to. This API does not delete sites.\n\nRequired scope: sites:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based page index. The API returns limit records starting at page × limit."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Site"
                  }
                },
                "example": [
                  {
                    "id": "site_123",
                    "name": "example.com",
                    "site_name": "Main site",
                    "domain": "example.com",
                    "custom_domain": "example.com",
                    "atomic_domain": "main.atomicat.net",
                    "project_id": "project_123",
                    "status": null,
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createSite",
        "tags": [
          "Sites"
        ],
        "summary": "Create a site",
        "description": "Creates a hosting site and returns its Atomicat domain. Custom domain DNS instructions are included when available.\n\nRequired scope: sites:write.",
        "responses": {
          "201": {
            "description": "The created site.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteCreated"
                },
                "example": {
                  "id": "site_123",
                  "site_id": "site_123",
                  "name": "Main site",
                  "atomic_domain": "main.atomicat.net",
                  "url": "https://main.atomicat.net",
                  "project_id": "project_123",
                  "custom_domain_instructions": null
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteCreate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/sites": {
      "get": {
        "operationId": "searchSites",
        "tags": [
          "Sites"
        ],
        "summary": "Search sites",
        "description": "Required scope: sites:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "description": "Exact site id. Returns a one-item array.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Site"
                  }
                },
                "example": [
                  {
                    "id": "site_123",
                    "name": "example.com",
                    "site_name": "Main site",
                    "domain": "example.com",
                    "custom_domain": "example.com",
                    "atomic_domain": "main.atomicat.net",
                    "project_id": "project_123",
                    "status": null,
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/sites/{siteId}": {
      "get": {
        "operationId": "getSite",
        "tags": [
          "Sites"
        ],
        "summary": "Get a site",
        "description": "Required scope: sites:read.",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "description": "Site id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The site.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                },
                "example": {
                  "id": "site_123",
                  "name": "example.com",
                  "site_name": "Main site",
                  "domain": "example.com",
                  "custom_domain": "example.com",
                  "atomic_domain": "main.atomicat.net",
                  "project_id": "project_123",
                  "status": null,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages": {
      "get": {
        "operationId": "listPages",
        "tags": [
          "Pages"
        ],
        "summary": "List pages",
        "description": "Required scope: pages:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based page index. The API returns limit records starting at page × limit."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "description": "Only pages on this site.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "published",
            "in": "query",
            "required": false,
            "description": "true for published pages, false for drafts.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_quiz",
            "in": "query",
            "required": false,
            "description": "true to return only quiz pages.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "has_element",
            "in": "query",
            "required": false,
            "description": "Only pages whose builder contains this element type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "available_for_funnel",
            "in": "query",
            "required": false,
            "description": "true to hide pages already used in a funnel.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Page"
                  }
                },
                "example": [
                  {
                    "id": "page_123",
                    "name": "Main Offer",
                    "page_name": "Main Offer",
                    "status": "draft",
                    "is_quiz": false,
                    "project_id": "project_123",
                    "site_id": null,
                    "site_name": null,
                    "domain": null,
                    "slug": "",
                    "url": null,
                    "edit_url": "https://app.atomicat.com.br/builder/page_123",
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z",
                    "published_at": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createPage",
        "tags": [
          "Pages"
        ],
        "summary": "Create a blank page",
        "description": "Creates a draft page. Publish it later with POST /pages/publish.\n\nRequired scope: pages:write.",
        "responses": {
          "201": {
            "description": "The created page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                },
                "example": {
                  "id": "page_123",
                  "name": "Main Offer",
                  "page_name": "Main Offer",
                  "status": "draft",
                  "is_quiz": false,
                  "project_id": "project_123",
                  "site_id": null,
                  "site_name": null,
                  "domain": null,
                  "slug": "",
                  "url": null,
                  "edit_url": "https://app.atomicat.com.br/builder/page_123",
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z",
                  "published_at": null
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageCreate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/from-template": {
      "post": {
        "operationId": "createPageFromTemplate",
        "tags": [
          "Pages"
        ],
        "summary": "Create a page from a template",
        "description": "Required scope: pages:write.",
        "responses": {
          "201": {
            "description": "The cloned page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                },
                "example": {
                  "id": "page_123",
                  "name": "Main Offer",
                  "page_name": "Main Offer",
                  "status": "draft",
                  "is_quiz": false,
                  "project_id": "project_123",
                  "site_id": null,
                  "site_name": null,
                  "domain": null,
                  "slug": "",
                  "url": null,
                  "edit_url": "https://app.atomicat.com.br/builder/page_123",
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z",
                  "published_at": null,
                  "template_id": "template_123",
                  "from_template": true
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageFromTemplate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/duplicate": {
      "post": {
        "operationId": "duplicatePage",
        "tags": [
          "Pages"
        ],
        "summary": "Duplicate a page",
        "description": "Required scope: pages:write.",
        "responses": {
          "201": {
            "description": "The duplicated page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageDuplicateResult"
                },
                "example": {
                  "id": "page_456",
                  "name": "Main Offer copy",
                  "page_name": "Main Offer copy",
                  "source_page_id": "page_123",
                  "edit_url": "https://app.atomicat.com.br/builder/page_456"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageDuplicate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/metadata": {
      "patch": {
        "operationId": "updatePageMetadata",
        "tags": [
          "Pages"
        ],
        "summary": "Update page metadata",
        "description": "page_id is required, plus at least one of name, project_id, tags, or product_label. tags can be an array or a comma-separated string.\n\nRequired scope: pages:write.",
        "responses": {
          "200": {
            "description": "The updated metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageMetadataResult"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "updated": true,
                  "name": "Main Offer",
                  "project_id": "project_123",
                  "tags": [
                    "sales"
                  ],
                  "product_label": "Starter kit"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageMetadata"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/content": {
      "patch": {
        "operationId": "updatePageContent",
        "tags": [
          "Pages"
        ],
        "summary": "Update mapped page content",
        "description": "updates is an object of content-map field keys to new values. Read the keys from GET /search/page-content-map. Unknown keys are returned in missing and are not applied.\n\nRequired scope: pages:write.",
        "responses": {
          "200": {
            "description": "The content update result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageContentResult"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "success": true,
                  "applied_count": 1,
                  "changed_section_count": 1,
                  "missing_count": 0,
                  "applied": "[]",
                  "missing": "[]"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageContentUpdate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/replace-variables": {
      "post": {
        "operationId": "replacePageVariables",
        "tags": [
          "Pages"
        ],
        "summary": "Replace template variables",
        "description": "variables maps placeholder names to replacement text. Placeholders look like {{name}} inside the page.\n\nRequired scope: pages:write.",
        "responses": {
          "200": {
            "description": "The replacement result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageVariablesResult"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "success": true,
                  "replacement_count": 2,
                  "changed_section_count": 1,
                  "replaced_variables": "[\"headline\"]",
                  "remaining_variables": "[]",
                  "remaining_variable_count": 0
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageVariables"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/builder": {
      "get": {
        "operationId": "getPageBuilder",
        "tags": [
          "Builder"
        ],
        "summary": "Read the page builder",
        "description": "Requires builder:read or pages:read. Set include_tree=false to omit the section tree.\n\nRequired scope: any of builder:read, pages:read.",
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "description": "Page id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_tree",
            "in": "query",
            "required": false,
            "description": "Include the section tree. Defaults to true.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The builder summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderSummary"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "builder": {
                    "sectionCount": 1,
                    "tree": {
                      "sections": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/builder/node": {
      "get": {
        "operationId": "getBuilderNode",
        "tags": [
          "Builder"
        ],
        "summary": "Read one builder node",
        "description": "Required scope: any of builder:read, pages:read.",
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "description": "Page id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": true,
            "description": "Node id from the builder tree.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The node.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderNode"
                },
                "example": {
                  "id": "node_123",
                  "page_id": "page_123",
                  "node_id": "node_123",
                  "path": "sections[0]",
                  "summary": null,
                  "node": {
                    "id": "node_123"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateBuilderNodeFields",
        "tags": [
          "Builder"
        ],
        "summary": "Update node fields",
        "description": "updates must include misc, style, or both. This patches those objects. It does not replace the whole node.\n\nRequired scope: any of builder:write, pages:write.",
        "responses": {
          "200": {
            "description": "The update result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderNodeUpdate"
                },
                "example": {
                  "id": "node_123",
                  "page_id": "page_123",
                  "node_id": "node_123",
                  "updated": true,
                  "path": "sections[0]"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuilderNodeFields"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/builder/node/replace": {
      "patch": {
        "operationId": "replaceBuilderNode",
        "tags": [
          "Builder"
        ],
        "summary": "Replace a builder node",
        "description": "node is the complete node object that replaces the existing node.\n\nRequired scope: any of builder:write, pages:write.",
        "responses": {
          "200": {
            "description": "The replace result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderNodeReplaceResult"
                },
                "example": {
                  "id": "node_123",
                  "page_id": "page_123",
                  "node_id": "node_123",
                  "updated": true,
                  "path": "sections[0]",
                  "builder_warnings": "[]"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuilderNodeReplace"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/delay": {
      "patch": {
        "operationId": "updatePageDelay",
        "tags": [
          "Builder"
        ],
        "summary": "Update the page reveal delay",
        "description": "Required scope: any of pages:write, builder:write.",
        "responses": {
          "200": {
            "description": "The delay result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageDelayResult"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "updated": true,
                  "delay": {
                    "time": 5
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageDelay"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/validate-before-publish": {
      "post": {
        "operationId": "validatePageBeforePublish",
        "tags": [
          "Pages"
        ],
        "summary": "Check whether a page can be published",
        "description": "ready_to_publish is false when the page has no sections or still contains template variables. issues, applied, and variable lists are JSON strings so list-style clients can store them.\n\nRequired scope: pages:read.",
        "responses": {
          "200": {
            "description": "The validation result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageValidation"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "ready_to_publish": true,
                  "issue_count": 0,
                  "issues": "[]",
                  "field_count": 4,
                  "remaining_variable_count": 0,
                  "remaining_variables": "[]"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageIdBody"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/publish": {
      "post": {
        "operationId": "publishPage",
        "tags": [
          "Pages"
        ],
        "summary": "Publish a page",
        "description": "page_id and site_id are required. slug is the path on the site. An empty slug publishes at the site root.\n\nRequired scope: any of pages:publish, pages:write.",
        "responses": {
          "200": {
            "description": "The publish result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagePublishResult"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "site_id": "site_123",
                  "success": true,
                  "url": "https://example.com/offer",
                  "domain": "example.com",
                  "slug": "offer",
                  "revision_saved": true,
                  "revision_warning": null
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PagePublish"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pages/{pageId}": {
      "get": {
        "operationId": "getPage",
        "tags": [
          "Pages"
        ],
        "summary": "Get a page",
        "description": "Reads a draft that has not appeared in the list yet, as well as published pages.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "description": "Page id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                },
                "example": {
                  "id": "page_123",
                  "name": "Main Offer",
                  "page_name": "Main Offer",
                  "status": "draft",
                  "is_quiz": false,
                  "project_id": "project_123",
                  "site_id": null,
                  "site_name": null,
                  "domain": null,
                  "slug": "",
                  "url": null,
                  "edit_url": "https://app.atomicat.com.br/builder/page_123",
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z",
                  "published_at": null
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deletePage",
        "tags": [
          "Pages"
        ],
        "summary": "Delete a page",
        "description": "A draft with no site is deleted directly. A published page, or a page already attached to a site, is deleted through the site and must already have a site id. A published page without a site returns 400.\n\nRequired scope: pages:write.",
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "description": "Page id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The record was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                },
                "example": {
                  "success": true,
                  "id": "record_123",
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/templates": {
      "get": {
        "operationId": "listTemplates",
        "tags": [
          "Pages"
        ],
        "summary": "List page templates",
        "description": "Required scope: pages:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Template category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Template type. Defaults to page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "query",
            "required": false,
            "description": "Exact template id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Template"
                  }
                },
                "example": [
                  {
                    "id": "template_123",
                    "name": "Offer",
                    "template_name": "Offer",
                    "category": "sales",
                    "type": "page",
                    "description": null,
                    "preview_url": null,
                    "image_url": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/templates": {
      "get": {
        "operationId": "searchTemplates",
        "tags": [
          "Pages"
        ],
        "summary": "Search page templates",
        "description": "Same filters and response as GET /templates.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Template category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Template type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "query",
            "required": false,
            "description": "Exact template id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Template"
                  }
                },
                "example": [
                  {
                    "id": "template_123",
                    "name": "Offer",
                    "template_name": "Offer",
                    "category": "sales",
                    "type": "page",
                    "description": null,
                    "preview_url": null,
                    "image_url": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/pages": {
      "get": {
        "operationId": "searchPages",
        "tags": [
          "Pages"
        ],
        "summary": "Search pages",
        "description": "Matches name, title, domain, and slug. page_id returns a one-item array. The default limit for this search is 100.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "page_id",
            "in": "query",
            "required": false,
            "description": "Exact page id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Page"
                  }
                },
                "example": [
                  {
                    "id": "page_123",
                    "name": "Main Offer",
                    "page_name": "Main Offer",
                    "status": "draft",
                    "is_quiz": false,
                    "project_id": "project_123",
                    "site_id": null,
                    "site_name": null,
                    "domain": null,
                    "slug": "",
                    "url": null,
                    "edit_url": "https://app.atomicat.com.br/builder/page_123",
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z",
                    "published_at": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/page-content-map": {
      "get": {
        "operationId": "getPageContentMap",
        "tags": [
          "Builder"
        ],
        "summary": "Read editable content fields",
        "description": "fields and variables are JSON strings. Use the field keys with PATCH /pages/content.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "description": "Page id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The content map.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentMap"
                },
                "example": {
                  "id": "page_123",
                  "page_id": "page_123",
                  "page_name": "Main Offer",
                  "field_count": 1,
                  "variable_count": 1,
                  "variables": "[\"headline\"]",
                  "fields": "[]",
                  "ready_for_variable_replacement": true
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/quizzes": {
      "get": {
        "operationId": "listQuizzes",
        "tags": [
          "Quizzes"
        ],
        "summary": "List quizzes",
        "description": "Quiz ids come from the quiz record (qid), which is not always the same as the page id.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based page index. The API returns limit records starting at page × limit."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "page_id",
            "in": "query",
            "required": false,
            "description": "Only quizzes on this page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quiz_id",
            "in": "query",
            "required": false,
            "description": "Exact quiz id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Quiz"
                  }
                },
                "example": [
                  {
                    "id": "quiz_123",
                    "name": "Main quiz",
                    "quiz_name": "Main quiz",
                    "page_id": "page_123",
                    "page_name": "Quiz page",
                    "site_id": null,
                    "project_id": "project_123",
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createQuiz",
        "tags": [
          "Quizzes"
        ],
        "summary": "Create a quiz page",
        "description": "Required scope: pages:write.",
        "responses": {
          "201": {
            "description": "The created quiz page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuizPage"
                },
                "example": {
                  "id": "page_123",
                  "name": "Main Offer",
                  "page_name": "Main Offer",
                  "status": "draft",
                  "is_quiz": true,
                  "project_id": "project_123",
                  "site_id": null,
                  "site_name": null,
                  "domain": null,
                  "slug": "",
                  "url": null,
                  "edit_url": "https://app.atomicat.com.br/builder/page_123",
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z",
                  "published_at": null,
                  "quiz_id": "page_123"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuizCreate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/quizzes": {
      "get": {
        "operationId": "searchQuizzes",
        "tags": [
          "Quizzes"
        ],
        "summary": "Search quizzes",
        "description": "Same filters and response as GET /quizzes.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based page index. The API returns limit records starting at page × limit."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "page_id",
            "in": "query",
            "required": false,
            "description": "Page id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quiz_id",
            "in": "query",
            "required": false,
            "description": "Quiz id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Quiz"
                  }
                },
                "example": [
                  {
                    "id": "quiz_123",
                    "name": "Main quiz",
                    "quiz_name": "Main quiz",
                    "page_id": "page_123",
                    "page_name": "Quiz page",
                    "site_id": null,
                    "project_id": "project_123",
                    "created_at": null,
                    "updated_at": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/quizzes/{quizId}": {
      "get": {
        "operationId": "getQuiz",
        "tags": [
          "Quizzes"
        ],
        "summary": "Get a quiz",
        "description": "quizId can be a quiz id (qid) or the id of a page marked as a quiz.\n\nRequired scope: pages:read.",
        "parameters": [
          {
            "name": "quizId",
            "in": "path",
            "required": true,
            "description": "Quiz id or quiz page id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The quiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quiz"
                },
                "example": {
                  "id": "quiz_123",
                  "name": "Main quiz",
                  "quiz_name": "Main quiz",
                  "page_id": "page_123",
                  "page_name": "Quiz page",
                  "site_id": null,
                  "project_id": "project_123",
                  "created_at": null,
                  "updated_at": null
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/quizzes/from-template": {
      "post": {
        "operationId": "createQuizFromTemplate",
        "tags": [
          "Quizzes"
        ],
        "summary": "Create a quiz from a template",
        "description": "Required scope: pages:write.",
        "responses": {
          "201": {
            "description": "The created quiz page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuizPage"
                },
                "example": {
                  "id": "page_123",
                  "name": "Main Offer",
                  "page_name": "Main Offer",
                  "status": "draft",
                  "is_quiz": true,
                  "project_id": "project_123",
                  "site_id": null,
                  "site_name": null,
                  "domain": null,
                  "slug": "",
                  "url": null,
                  "edit_url": "https://app.atomicat.com.br/builder/page_123",
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z",
                  "published_at": null,
                  "quiz_id": "page_123",
                  "from_template": true,
                  "template_id": "template_123"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageFromTemplate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/funnels": {
      "get": {
        "operationId": "listFunnels",
        "tags": [
          "Funnels"
        ],
        "summary": "List funnels",
        "description": "This API does not delete funnels.\n\nRequired scope: funnels:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Funnel"
                  }
                },
                "example": [
                  {
                    "id": "funnel_123",
                    "name": "Main funnel",
                    "site_id": "site_123",
                    "project_id": "project_123",
                    "status": "active",
                    "pages": [
                      "page_123"
                    ],
                    "page_ids": "page_123",
                    "steps": [],
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createFunnel",
        "tags": [
          "Funnels"
        ],
        "summary": "Create a funnel",
        "description": "Each page entry needs pageId or url, plus pageType.\n\nRequired scope: funnels:write.",
        "responses": {
          "201": {
            "description": "The created funnel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Funnel"
                },
                "example": {
                  "id": "funnel_123",
                  "name": "Main funnel",
                  "site_id": null,
                  "project_id": "project_123",
                  "status": null,
                  "pages": [],
                  "page_ids": "",
                  "steps": [],
                  "created_at": null,
                  "updated_at": null
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FunnelCreate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateFunnel",
        "tags": [
          "Funnels"
        ],
        "summary": "Update a funnel",
        "description": "funnel_id is required. pages replaces the step list when you send it.\n\nRequired scope: funnels:write.",
        "responses": {
          "200": {
            "description": "The updated funnel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Funnel"
                },
                "example": {
                  "id": "funnel_123",
                  "name": "Main funnel",
                  "site_id": null,
                  "project_id": null,
                  "status": null,
                  "pages": [],
                  "page_ids": "",
                  "steps": [],
                  "created_at": null,
                  "updated_at": null
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FunnelUpdate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/funnels": {
      "get": {
        "operationId": "searchFunnels",
        "tags": [
          "Funnels"
        ],
        "summary": "Search funnels",
        "description": "Required scope: funnels:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          },
          {
            "name": "funnel_id",
            "in": "query",
            "required": false,
            "description": "Exact funnel id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Funnel"
                  }
                },
                "example": [
                  {
                    "id": "funnel_123",
                    "name": "Main funnel",
                    "site_id": null,
                    "project_id": null,
                    "status": null,
                    "pages": [],
                    "page_ids": "",
                    "steps": [],
                    "created_at": null,
                    "updated_at": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/funnels/{funnelId}": {
      "get": {
        "operationId": "getFunnel",
        "tags": [
          "Funnels"
        ],
        "summary": "Get a funnel",
        "description": "Required scope: funnels:read.",
        "parameters": [
          {
            "name": "funnelId",
            "in": "path",
            "required": true,
            "description": "Funnel id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The funnel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Funnel"
                },
                "example": {
                  "id": "funnel_123",
                  "name": "Main funnel",
                  "site_id": null,
                  "project_id": null,
                  "status": null,
                  "pages": [],
                  "page_ids": "",
                  "steps": [],
                  "created_at": null,
                  "updated_at": null
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/videos": {
      "get": {
        "operationId": "listVideos",
        "tags": [
          "Videos"
        ],
        "summary": "List videos",
        "description": "Uses skip instead of page. This API does not upload or delete videos. Poll this endpoint after an upload; there is no video.uploaded webhook.\n\nRequired scope: videos:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum videos. Defaults to 50 and cannot exceed 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "description": "Number of videos to skip. Defaults to 0.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Video"
                  }
                },
                "example": [
                  {
                    "id": "video_123",
                    "video_id": "video_123",
                    "name": "Lesson 1",
                    "title": "Lesson 1",
                    "status": "ready",
                    "duration": 120,
                    "thumbnail_url": null,
                    "project_id": "project_123",
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateVideo",
        "tags": [
          "Videos"
        ],
        "summary": "Update video player settings",
        "description": "video_id is required. Send only the settings you want to change.\n\nRequired scope: videos:write.",
        "responses": {
          "200": {
            "description": "The updated video.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Video"
                },
                "example": {
                  "id": "video_123",
                  "video_id": "video_123",
                  "name": "Lesson 1",
                  "title": "Lesson 1",
                  "status": "ready",
                  "duration": 120,
                  "thumbnail_url": null,
                  "project_id": "project_123",
                  "created_at": null,
                  "updated_at": null
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoUpdate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/videos": {
      "get": {
        "operationId": "searchVideos",
        "tags": [
          "Videos"
        ],
        "summary": "Search videos",
        "description": "Required scope: videos:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "video_id",
            "in": "query",
            "required": false,
            "description": "Exact video id. Returns a one-item array.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "description": "Number of videos to skip when searching the list.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Video"
                  }
                },
                "example": [
                  {
                    "id": "video_123",
                    "video_id": "video_123",
                    "name": "Lesson 1",
                    "title": "Lesson 1",
                    "status": "ready",
                    "duration": null,
                    "thumbnail_url": null,
                    "project_id": null,
                    "created_at": null,
                    "updated_at": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/videos/{videoId}": {
      "get": {
        "operationId": "getVideo",
        "tags": [
          "Videos"
        ],
        "summary": "Get a video",
        "description": "Required scope: videos:read.",
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "required": true,
            "description": "Video id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The video.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Video"
                },
                "example": {
                  "id": "video_123",
                  "video_id": "video_123",
                  "name": "Lesson 1",
                  "title": "Lesson 1",
                  "status": "ready",
                  "duration": 120,
                  "thumbnail_url": null,
                  "project_id": null,
                  "created_at": null,
                  "updated_at": null
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/products": {
      "get": {
        "operationId": "listProducts",
        "tags": [
          "Products"
        ],
        "summary": "List products",
        "description": "Required scope: products:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based page index. The API returns limit records starting at page × limit."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "simple or bundle.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                },
                "example": [
                  {
                    "id": "product_123",
                    "name": "Starter kit",
                    "type": "simple",
                    "sku": "KIT-1",
                    "description": "Example product",
                    "image": null,
                    "show_full_product": false,
                    "price": 97,
                    "compare_price": 197,
                    "rating": "4.9",
                    "rating_count": "10K+",
                    "project_id": "project_123",
                    "cta_text": "Buy now",
                    "cta_url": "https://example.com/checkout",
                    "cta_target": false,
                    "use_single_cta_link": false,
                    "bundle_discount": 0,
                    "bundle_item_count": 0,
                    "tiers_enabled": false,
                    "subscription_enabled": false,
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createProduct",
        "tags": [
          "Products"
        ],
        "summary": "Create a product",
        "description": "name is required. type is simple or bundle. A bundle requires bundle_items_json.\n\nRequired scope: products:write.",
        "responses": {
          "201": {
            "description": "The created product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "example": {
                  "id": "product_123",
                  "name": "Starter kit",
                  "type": "simple",
                  "sku": "KIT-1",
                  "description": "Example product",
                  "image": null,
                  "show_full_product": false,
                  "price": 97,
                  "compare_price": 197,
                  "rating": "4.9",
                  "rating_count": "10K+",
                  "project_id": "project_123",
                  "cta_text": "Buy now",
                  "cta_url": "https://example.com/checkout",
                  "cta_target": false,
                  "use_single_cta_link": false,
                  "bundle_discount": 0,
                  "bundle_item_count": 0,
                  "tiers_enabled": false,
                  "subscription_enabled": false,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductWrite"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateProduct",
        "tags": [
          "Products"
        ],
        "summary": "Update a product",
        "description": "product_id is required. Send only the fields you want to change.\n\nRequired scope: products:write.",
        "responses": {
          "200": {
            "description": "The updated product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "example": {
                  "id": "product_123",
                  "name": "Starter kit",
                  "type": "simple",
                  "sku": "KIT-1",
                  "description": "Example product",
                  "image": null,
                  "show_full_product": false,
                  "price": 97,
                  "compare_price": 197,
                  "rating": "4.9",
                  "rating_count": "10K+",
                  "project_id": "project_123",
                  "cta_text": "Buy now",
                  "cta_url": "https://example.com/checkout",
                  "cta_target": false,
                  "use_single_cta_link": false,
                  "bundle_discount": 0,
                  "bundle_item_count": 0,
                  "tiers_enabled": false,
                  "subscription_enabled": false,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/products": {
      "get": {
        "operationId": "searchProducts",
        "tags": [
          "Products"
        ],
        "summary": "Search products",
        "description": "Required scope: products:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of records. Defaults to 50 and cannot exceed 100."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only records in this project."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "simple or bundle.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "description": "Exact product id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                },
                "example": [
                  {
                    "id": "product_123",
                    "name": "Starter kit",
                    "type": "simple",
                    "sku": "KIT-1",
                    "description": "Example product",
                    "image": null,
                    "show_full_product": false,
                    "price": 97,
                    "compare_price": 197,
                    "rating": "4.9",
                    "rating_count": "10K+",
                    "project_id": "project_123",
                    "cta_text": "Buy now",
                    "cta_url": "https://example.com/checkout",
                    "cta_target": false,
                    "use_single_cta_link": false,
                    "bundle_discount": 0,
                    "bundle_item_count": 0,
                    "tiers_enabled": false,
                    "subscription_enabled": false,
                    "created_at": "2026-09-26T12:00:00.000Z",
                    "updated_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/products/{productId}": {
      "get": {
        "operationId": "getProduct",
        "tags": [
          "Products"
        ],
        "summary": "Get a product",
        "description": "Required scope: products:read.",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "description": "Product id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "example": {
                  "id": "product_123",
                  "name": "Starter kit",
                  "type": "simple",
                  "sku": "KIT-1",
                  "description": "Example product",
                  "image": null,
                  "show_full_product": false,
                  "price": 97,
                  "compare_price": 197,
                  "rating": "4.9",
                  "rating_count": "10K+",
                  "project_id": "project_123",
                  "cta_text": "Buy now",
                  "cta_url": "https://example.com/checkout",
                  "cta_target": false,
                  "use_single_cta_link": false,
                  "bundle_discount": 0,
                  "bundle_item_count": 0,
                  "tiers_enabled": false,
                  "subscription_enabled": false,
                  "created_at": "2026-09-26T12:00:00.000Z",
                  "updated_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteProduct",
        "tags": [
          "Products"
        ],
        "summary": "Delete a product",
        "description": "Required scope: products:write.",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "description": "Product id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The record was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                },
                "example": {
                  "success": true,
                  "id": "record_123",
                  "deleted": true
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record does not exist or belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/search/leads": {
      "get": {
        "operationId": "searchLeads",
        "tags": [
          "Leads"
        ],
        "summary": "Search leads",
        "description": "type is form, quiz, or omitted for both. The default limit is 25 and the maximum is 50. There is no create or delete endpoint for leads.\n\nRequired scope: leads:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum leads. Defaults to 25 and cannot exceed 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            }
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive text matched against the record name and related fields."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "form or quiz.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_id",
            "in": "query",
            "required": false,
            "description": "Exact lead id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_id",
            "in": "query",
            "required": false,
            "description": "Only leads from this page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Exact email match.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records. The body is a JSON array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Lead"
                  }
                },
                "example": [
                  {
                    "id": "lead_123",
                    "lead_id": "lead_123",
                    "type": "form",
                    "name": "Jane Example",
                    "first_name": "Jane",
                    "last_name": "Example",
                    "email": "jane@example.com",
                    "phone": "+15555550123",
                    "form_id": "form_123",
                    "form_name": "Checkout",
                    "page_id": "page_123",
                    "page_url": "https://example.com/offer",
                    "project_id": "project_123",
                    "site_id": "site_123",
                    "abandoned": false,
                    "fields": {},
                    "created_at": "2026-09-26T12:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/analytics": {
      "get": {
        "operationId": "getAnalytics",
        "tags": [
          "Analytics"
        ],
        "summary": "Get account counts",
        "description": "Owner-scoped counts. This is not a visit, conversion, or revenue report.\n\nRequired scope: analytics:read.",
        "responses": {
          "200": {
            "description": "The counts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Analytics"
                },
                "example": {
                  "pages": 12,
                  "sites": 2,
                  "funnels": 3,
                  "products": 4,
                  "projects": 1,
                  "form_leads": 80,
                  "quiz_leads": 20
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/hooks": {
      "post": {
        "operationId": "createHook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Subscribe to an event",
        "description": "target_url must be public HTTPS. Localhost, private IP addresses, and hostnames that resolve to them are rejected. The URL is checked again before each delivery. Any one of the listed scopes is enough to create a subscription.\n\nRequired scope: any of leads:read, pages:read, products:read, funnels:read, sites:read, projects:read.",
        "responses": {
          "201": {
            "description": "The subscription. The target URL is not returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookSubscription"
                },
                "example": {
                  "id": "sub_123",
                  "event_type": "form_lead.created",
                  "active": true,
                  "created_at": "2026-09-26T12:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HookCreate"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/hooks/{subscriptionId}": {
      "delete": {
        "operationId": "deleteHook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Disable a webhook subscription",
        "description": "Marks the subscription inactive. Deliveries stop. The response is { success: true }.\n\nRequired scope: any of leads:read, pages:read, products:read, funnels:read, sites:read, projects:read.",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "description": "Subscription id returned by POST /hooks.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription was disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/hooks/sample/{eventType}": {
      "get": {
        "operationId": "getHookSample",
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a sample webhook payload",
        "description": "Returns an array with one sample object. eventType is form_lead.created, quiz_lead.created, page.published, page.created, product.created, funnel.created, site.created, or project.created. Unknown types return the form-lead sample.\n\nRequired scope: any of leads:read, pages:read, products:read, funnels:read, sites:read, projects:read.",
        "parameters": [
          {
            "name": "eventType",
            "in": "path",
            "required": true,
            "description": "Event name, for example form_lead.created.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One sample event in an array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                },
                "example": [
                  {
                    "id": "sample_123",
                    "event_type": "form_lead.created",
                    "email": "jane@example.com"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "The request is missing a field or contains an invalid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The bearer token is missing, invalid, expired, or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but does not include the required scope, or the client IP is not on the key allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The token exceeded 5,000 requests in 10 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  }
}
