openapi: 3.1.0 info: title: Page Pulse REST API version: "1.0.0" summary: Read page changes, impact bands and traffic outcomes for the sites you track. description: | Page Pulse tracks on-page changes (titles, meta descriptions, headings, body text, links, canonical and Open Graph tags) on the websites you monitor, scores every change with an impact model, and ties changes to Google Search Console and GA4 traffic outcomes. Most project endpoints run the same tool as the Page Pulse MCP server, so the REST API and MCP return the same data and charge the same prices. `PATCH /projects/{project}` and the AI change summary are REST only. **Authentication.** Send a personal access token as `Authorization: Bearer `. Create tokens in the app at Settings, then API & MCP. **Always send `Accept: application/json`.** Without it, validation and authentication errors are returned as redirects instead of JSON. **Billing.** Reads and webhooks are free. Plans include the API, MCP and webhooks, and sites on a plan are never charged. Sites billed per check (every site on a pay-as-you-go-only account, or a plan account's sites moved to pay as you go) pay $0.001 per page fetched and $0.005 per live check. Discovery costs $0.001 per path found on pay-as-you-go-only accounts and is free on a plan. Set a site's billing with `billing` on `POST /projects` or `PATCH /projects/{project}`. **Rate limit.** The REST API allows 60 requests per minute per user. Over the limit returns 429. contact: name: Page Pulse url: https://app.pagepulse.dev servers: - url: https://app.pagepulse.dev/api/v1 security: - bearerAuth: [] tags: - name: Account description: Your organization, plan, balance, prices and metered usage. - name: Projects description: Tracked websites and their settings. - name: Pages description: Tracked pages inside a project, and on-demand live checks. - name: Changes description: Detected on-page changes, impact bands, AI summaries and measured outcomes. - name: Analytics description: Search Console and GA4 metrics for projects and pages. - name: Alerts description: Email and Slack alerts on page changes and traffic thresholds. - name: Webhooks description: Endpoints that receive signed change and outcome events. - name: Discovery description: Read a site's sitemap before creating a project. paths: /account: get: tags: [Account] operationId: getAccount summary: Get account, plan and balance description: The caller's organization, plan, pay-as-you-go balance, grace period state and current prices. Free. responses: "200": description: Account details. content: application/json: schema: { $ref: "#/components/schemas/Account" } example: organization: Acme Marketing plan: api plan_label: Pay as you go pay_as_you_go: true balance_usd: 41.2875 monitoring_paused: false grace_period_ends_at: null auto_replenish: { enabled: true, amount_usd: 50, monthly_cap_usd: 500 } prices_usd: { page_check: 0.001, live_check: 0.005, discovery: 0.001 } "401": { $ref: "#/components/responses/Unauthorized" } "429": { $ref: "#/components/responses/TooManyRequests" } /usage: get: tags: [Account] operationId: getUsage summary: Get metered usage description: Metered usage between two dates (default this month to date), totalled by type and by project. Free. parameters: - name: start_date in: query description: First day to include (YYYY-MM-DD). Defaults to the first day of the current month. schema: { type: string, format: date } - name: end_date in: query description: Last day to include (YYYY-MM-DD). Must be on or after start_date. Defaults to now. schema: { type: string, format: date } responses: "200": description: Usage totals. content: application/json: schema: { $ref: "#/components/schemas/Usage" } example: start_date: "2026-10-01" end_date: "2026-10-09" total_cost_usd: 8.712 by_type: page_check: { quantity: 8412, cost_usd: 8.412 } live_check: { quantity: 40, cost_usd: 0.2 } discovery: { quantity: 100, cost_usd: 0.1 } by_project: - { project_uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com, quantity: 8452, cost_usd: 8.612 } - { project_uuid: null, name: null, quantity: 100, cost_usd: 0.1 } "401": { $ref: "#/components/responses/Unauthorized" } "422": { $ref: "#/components/responses/ValidationError" } "429": { $ref: "#/components/responses/TooManyRequests" } /webhooks: get: tags: [Webhooks] operationId: listWebhooks summary: List webhook endpoints responses: "200": description: The organization's endpoints and the event names you can subscribe to. content: application/json: schema: type: object required: [webhooks, events] properties: webhooks: type: array items: { $ref: "#/components/schemas/Webhook" } events: type: array items: { $ref: "#/components/schemas/WebhookEventName" } example: webhooks: - uuid: 3f0b8f4e-1c2d-4e5f-8a9b-0c1d2e3f4a5b url: https://hooks.example.com/pagepulse events: [change.notable, outcome.ready] enabled: true last_delivered_at: "2026-10-09T13:45:12+00:00" last_failed_at: null last_error: null disabled_at: null events: [change.detected, change.notable, outcome.ready] "401": { $ref: "#/components/responses/Unauthorized" } "429": { $ref: "#/components/responses/TooManyRequests" } post: tags: [Webhooks] operationId: createWebhook summary: Create a webhook endpoint description: | Registers a public https URL to receive events. The response includes the signing `secret`. It is shown once, here, and never again. An organization can have up to 10 endpoints. requestBody: required: true content: application/json: schema: type: object required: [url, events] properties: url: type: string format: uri maxLength: 2048 description: Public https URL. Private, local and plain http addresses are refused. events: type: array minItems: 1 items: { $ref: "#/components/schemas/WebhookEventName" } example: url: https://hooks.example.com/pagepulse events: [change.notable, outcome.ready] responses: "201": description: Endpoint created. Store the secret now. content: application/json: schema: allOf: - $ref: "#/components/schemas/Webhook" - type: object required: [secret] properties: secret: type: string description: Signing secret, prefixed whsec_. Shown only in this response. example: uuid: 3f0b8f4e-1c2d-4e5f-8a9b-0c1d2e3f4a5b url: https://hooks.example.com/pagepulse events: [change.notable, outcome.ready] enabled: true last_delivered_at: null last_failed_at: null last_error: null disabled_at: null secret: whsec_Q2x8m1Rr0pZk3vN7aTyc4LwE9bHs6dJfGuK5oXiV "401": { $ref: "#/components/responses/Unauthorized" } "422": description: Validation failed, the URL is not a public https address, or the organization already has 10 endpoints. content: application/json: schema: { $ref: "#/components/schemas/Error" } examples: limit: { value: { error: An organization can have up to 10 webhooks. } } private: { value: { error: The webhook URL must be a public https address. } } "429": { $ref: "#/components/responses/TooManyRequests" } /webhooks/{webhook}: parameters: - $ref: "#/components/parameters/WebhookUuid" patch: tags: [Webhooks] operationId: updateWebhook summary: Update a webhook endpoint description: | Change the subscribed events or switch the endpoint on or off. The URL cannot be changed; create a new endpoint instead. Setting `enabled: true` also resets the failure counter, which is how you turn an automatically disabled endpoint back on. requestBody: required: true content: application/json: schema: type: object properties: events: type: array minItems: 1 items: { $ref: "#/components/schemas/WebhookEventName" } enabled: type: boolean example: enabled: true responses: "200": description: The updated endpoint. content: application/json: schema: { $ref: "#/components/schemas/Webhook" } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ValidationError" } "429": { $ref: "#/components/responses/TooManyRequests" } delete: tags: [Webhooks] operationId: deleteWebhook summary: Delete a webhook endpoint responses: "200": description: Deleted. content: application/json: schema: type: object properties: deleted: { type: boolean, const: true } example: { deleted: true } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /webhooks/{webhook}/test: parameters: - $ref: "#/components/parameters/WebhookUuid" post: tags: [Webhooks] operationId: testWebhook summary: Send a signed test event description: | Sends one signed `ping` event to the endpoint right away and reports whether your server answered with a 2xx status. Use it to check your signature verification. responses: "200": description: Your endpoint returned a 2xx status. content: application/json: schema: { $ref: "#/components/schemas/WebhookTestResult" } example: { delivered: true, error: null } "502": description: Your endpoint returned a non-2xx status, timed out (10 seconds) or could not be reached. content: application/json: schema: { $ref: "#/components/schemas/WebhookTestResult" } example: { delivered: false, error: HTTP 500 } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /discover: post: tags: [Discovery] operationId: discoverSitePaths summary: Discover a site's paths from its sitemap description: | Reads a site's public sitemap (robots.txt first, then the usual locations) and returns its URL paths grouped by first path segment, plus the flat list of root-level pages. Use it to choose `include_paths` before creating a project. Nothing is created. On pay-as-you-go-only accounts: $0.001 per unique path found, refused with 402 when the balance is empty. Free on plan accounts. Nothing is charged when no sitemap is found. requestBody: required: true content: application/json: schema: type: object required: [url] properties: url: type: string description: The website to inspect, e.g. https://example.com. https:// is assumed when no scheme is given. sitemap_url: type: string description: Exact sitemap URL, if known. Omit to try robots.txt and the usual locations. example: url: https://example.com responses: "200": description: Paths found in the sitemap. content: application/json: schema: { $ref: "#/components/schemas/Discovery" } example: site: https://example.com sitemap_url: https://example.com/sitemap_index.xml total_urls: 142 path_groups: - { path: /blog/, count: 96, samples: [/blog/spring-lawn-care/, /blog/hydroseeding-vs-sod/, /blog/patio-costs/] } - { path: /services/, count: 12, samples: [/services/hydroseeding/, /services/patios/, /services/retaining-walls/] } root_pages: [/about/, /contact/, /patio-installation/] all_paths: [/, /about/, /blog/hydroseeding-vs-sod/, /contact/, /patio-installation/, /services/hydroseeding/] next_step: Match what the user asked for against these paths... "401": { $ref: "#/components/responses/Unauthorized" } "402": { $ref: "#/components/responses/PaymentRequired" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects: get: tags: [Projects] operationId: listProjects summary: List projects description: Every project in your organization, including the demo project and competitors. Returns a JSON array, with each site's `billing`. Use `uuid` as `{project}` in other calls. responses: "200": description: Projects, sorted by name. content: application/json: schema: type: array items: { $ref: "#/components/schemas/Project" } example: - uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00 name: acme.com url: https://acme.com traffic_connected: true is_demo: false capabilities: Page-change tracking plus Search Console/Analytics traffic data. "401": { $ref: "#/components/responses/Unauthorized" } "429": { $ref: "#/components/responses/TooManyRequests" } post: tags: [Projects] operationId: createProject summary: Create a project description: | Starts tracking a website. Two modes: - **Discovery:** pass `url` (the domain root). The crawler starts at the root and finds pages up to your plan's cap. Narrow it with `include_paths`. A `url` with a path is refused, because the path would be ignored. - **URL list:** pass `urls` (up to 200 exact page URLs on one domain). Only those pages are tracked and no discovery runs. Add more later with `POST /projects/{project}/pages`. New projects are crawl-only. Search Console and GA4 can only be connected by a person in the web app. If a project for the same site already exists, it is returned with `status: already_tracked` instead of creating a duplicate. The first crawl usually runs with the nightly cycle, so expect changes from the next day. On a plan account with pay as you go turned on, `billing: pay_as_you_go` puts the new site on per-check billing: no page cap, data by API, MCP and webhooks only. It applies only when the site is created, and is ignored on other accounts. requestBody: required: true content: application/json: schema: type: object description: Pass url, urls, or both. anyOf: - required: [url] - required: [urls] properties: url: type: string description: The website to track by discovery, e.g. https://example.com. Must be the domain root. name: type: string description: Display name. Defaults to the domain without www. urls: type: array maxItems: 200 items: { type: string } description: Exact absolute page URLs to track, all on one domain. No discovery runs. include_paths: type: array items: { type: string } description: Track only pages under these paths, e.g. ["/services/"]. Omit to track the whole site. sitemap_url: type: string description: Optional XML sitemap URL. When given, path selection must be finished in the web app before syncing starts. billing: type: string enum: [plan, pay_as_you_go] description: Plan accounts with pay as you go only. Omit for the plan. Ignored otherwise. examples: discovery: summary: Track a section of a site value: { url: "https://acme.com", include_paths: ["/services/"] } urlList: summary: Track exact pages value: { urls: ["https://www.g2.com/products/hubspot/reviews", "https://www.g2.com/products/hubspot/pricing"], name: HubSpot on G2 } responses: "201": description: Project created, or the existing project returned (check `status`). content: application/json: schema: { $ref: "#/components/schemas/CreateProjectResult" } example: status: created project: uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00 name: acme.com url: https://acme.com traffic_connected: false message: Now tracking "acme.com", only pages under /services/. The first crawl is queued... alerting: available_now: Page-change alerts and scheduled digests (use create-alert-tool). unavailable: Traffic alerts on clicks, impressions, or rankings, this project has no Google connection. to_enable_traffic_alerts: The user must connect Google Search Console or GA4 themselves at https://app.pagepulse.dev/projects/9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00/edit. "401": { $ref: "#/components/responses/Unauthorized" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}: parameters: - $ref: "#/components/parameters/ProjectUuid" patch: tags: [Projects] operationId: updateProject summary: Update project settings description: | Change how often the project is checked. Allowed values are 1, 3 and 7 days, and never more often than your plan's own frequency. On an account with a plan and pay as you go, `billing` puts the site on the plan (its pages count toward the plan's allowance, with the full app) or on pay as you go (billed per check from your balance, data by API, MCP and webhooks only). Send at least one of the two fields. Returns 422 when `billing` is sent for a competitor (it follows its site), on an account without both a plan and pay as you go, or for the demo project. requestBody: required: true content: application/json: schema: type: object properties: check_every_days: type: integer enum: [1, 3, 7] billing: type: string enum: [plan, pay_as_you_go] example: { check_every_days: 3, billing: pay_as_you_go } responses: "200": description: The saved settings. content: application/json: schema: type: object properties: project_uuid: { type: string, format: uuid } check_every_days: { type: [integer, "null"] } billing: { type: string, enum: [plan, pay_as_you_go] } plan_pages_over_allowance: type: integer description: Pages on plan sites beyond the plan's allowance after this change. Those least-visited pages pause until you upgrade or remove pages. example: { project_uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, check_every_days: 3, billing: pay_as_you_go, plan_pages_over_allowance: 0 } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ValidationError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/pages: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Pages] operationId: listPages summary: List tracked pages description: | Tracked pages with title, tags, crawl status and Search Console totals for the date range. Sorted by clicks (descending) by default; ties break on page id so pagination is stable. Offset pagination with `page` and `per_page`. parameters: - name: search in: query description: Filter pages by URL path (partial match). schema: { type: string } - $ref: "#/components/parameters/TagIds" - $ref: "#/components/parameters/HasPageChangeOn" - $ref: "#/components/parameters/StartDate30" - $ref: "#/components/parameters/EndDate" - $ref: "#/components/parameters/Page" - name: per_page in: query description: Items per page, 1 to 100. Defaults to 25. schema: { type: integer, minimum: 1, maximum: 100, default: 25 } - name: order_by in: query schema: { type: string, enum: [clicks, impressions, url, id], default: clicks } - $ref: "#/components/parameters/OrderByDir" responses: "200": description: A page of tracked pages. content: application/json: schema: { $ref: "#/components/schemas/PageList" } example: date_range: { start: "2026-09-08", end: "2026-10-08" } data: - id: 48213 url: https://acme.com/services/hydroseeding/ path: /services/hydroseeding/ title: Hydroseeding Services | Acme crawl_status: ok crawl_failure_reason: null last_crawl_failed_at: null tags: [Services] clicks: 1284 impressions: 40211 position: 6.3 meta: { total: 212, page: 1, per_page: 25, total_pages: 9, order_by: clicks, order_by_dir: desc } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } post: tags: [Pages] operationId: addPages summary: Add pages description: | Adds exact page URLs to a project. Every URL must be on the project's domain (www and non-www count as the same site). Up to 200 URLs per call, within your plan's page allowance. Each URL gets its own result, so a partly rejected batch is still usable. Already tracked URLs get the new tags. Each new page gets a first snapshot right away; changes are detected from the next scheduled crawl. requestBody: required: true content: application/json: schema: type: object required: [urls] properties: urls: type: array maxItems: 200 items: { type: string } description: Absolute page URLs on the project's domain. tags: type: array items: { type: string } description: Tag names applied to every page in this call. Created if they do not exist. example: urls: [https://acme.com/pricing/, https://acme.com/services/patios/] tags: [Money pages] responses: "201": description: Per-URL results. Returned even when no page was added; check `summary`. content: application/json: schema: { $ref: "#/components/schemas/AddPagesResult" } example: project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com } summary: { added: 1, already_tracked: 1, rejected: 0, tags_applied: [Money pages] } results: - { url: "https://acme.com/pricing/", status: added, page_id: 51877 } - { url: "https://acme.com/services/patios/", status: already_tracked, page_id: 48219 } message: 1 page(s) queued for their first snapshot... "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } delete: tags: [Pages] operationId: removePages summary: Remove pages description: | Permanently removes tracked pages and all their history (snapshots, detected changes, metrics). This cannot be undone. Up to 200 URLs per call. Whole projects can only be deleted in the web app. requestBody: required: true content: application/json: schema: type: object required: [urls] properties: urls: type: array maxItems: 200 items: { type: string } example: urls: [https://acme.com/old-landing-page/] responses: "200": description: Per-URL results. content: application/json: schema: { $ref: "#/components/schemas/RemovePagesResult" } example: project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com } summary: { removed: 1, not_found: 0 } results: - { url: "https://acme.com/old-landing-page/", status: removed } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/tags: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Projects] operationId: listTags summary: List tags description: Tags defined on the project, with ids (for `tag_ids` filters) and page counts. responses: "200": description: Tags, sorted by name. content: application/json: schema: type: object properties: project: { $ref: "#/components/schemas/ProjectRef" } tags: type: array items: type: object properties: id: { type: integer } name: { type: string } page_count: { type: integer } example: project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com } tags: - { id: 311, name: Blog, page_count: 96 } - { id: 312, name: Services, page_count: 12 } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/changes: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Changes] operationId: searchChanges summary: Search changes across a project description: | Detected changes across every page in the project, newest first, with impact bands. Keyset paginated: pass `meta.next_cursor` back as `cursor` until it is null. One template or navigation edit can hit hundreds of pages. Rows that share a `change_group_id` are the same edit; collapse them and report `affected_page_count`. `min_band` only applies when the project has been impact scored. Check `meta.impact_scored` and `meta.band_filter_applied`; when the filter was not applied a top-level `warning` is included. parameters: - name: start_date in: query description: YYYY-MM-DD. Defaults to 30 days before end_date. schema: { type: string, format: date } - $ref: "#/components/parameters/EndDate" - name: field_names[] in: query description: | Only these change kinds. Group keys `content`, `headings`, `links`, `meta`, or raw field labels such as `Text (p)`, `Heading (h1)`, `Meta (title)`. Repeat the parameter for several values. Omit for all. style: form explode: true schema: type: array items: { type: string } - name: change_types[] in: query description: Only these actions. Repeat for several. Omit for all. style: form explode: true schema: type: array items: { type: string, enum: [new, edit, removal] } - name: min_band in: query description: Impact floor. Returns that band and every stronger one. schema: { $ref: "#/components/schemas/ImpactBand" } - $ref: "#/components/parameters/TagIds" - name: url_pattern in: query description: Substring of the page path, e.g. /blog/. schema: { type: string } - name: limit in: query description: Rows per call, 1 to 200. schema: { type: integer, minimum: 1, maximum: 200, default: 50 } - name: cursor in: query description: meta.next_cursor from the previous response. schema: { type: integer } responses: "200": description: A page of changes. content: application/json: schema: { $ref: "#/components/schemas/ChangeSearchResult" } example: data: - id: 9921045 page_id: 48213 page_path: /services/hydroseeding/ detected_at: "2026-10-07 04:12:33" field_name: Meta (title) change_type: edit impact_band: high impact_score: 78.4 change_group_id: 6f1c2b0a9e8d7c6b5a4f3e2d1c0b9a8f affected_page_count: 1 old_value: Hydroseeding Services | Acme new_value: Hydroseeding in Denver, Fast Germination | Acme meta: date_range: { start: "2026-09-08", end: "2026-10-08" } limit: 50 next_cursor: 9920871 min_band: notable band_filter_applied: true impact_scored: true "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/outcomes: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Changes] operationId: getChangeOutcomes summary: Get measured change outcomes description: | Measured verdicts from the impact model: for each meaningful change window, how clicks moved afterward compared with the page's own expected baseline, with a confidence band. Sorted by confidence, highest first. Only changes that finished an evaluation horizon appear, so a recent change may still be measuring. parameters: - name: start_date in: query description: Earliest change-window start (YYYY-MM-DD). Defaults to 90 days before end_date. schema: { type: string, format: date } - name: end_date in: query description: Latest change-window start (YYYY-MM-DD). Defaults to yesterday. schema: { type: string, format: date } - name: min_confidence_band in: query description: Minimum confidence. Omit for all evaluated outcomes. schema: { type: string, enum: [possible, likely, high] } - name: page_id in: query description: Only outcomes for this page. schema: { type: integer } - name: limit in: query description: Max rows, 1 to 100. schema: { type: integer, minimum: 1, maximum: 100, default: 25 } responses: "200": description: Outcomes. content: application/json: schema: { $ref: "#/components/schemas/OutcomesResult" } example: window: { start: "2026-07-11", end: "2026-10-08" } outcomes: - page_id: 48213 page_path: /services/hydroseeding/ changed_on: "2026-08-14" dominant_fields: [Meta (title), Heading (h1)] change_impact_band: high clicks_lift_pct: 23.4 impressions_lift_pct: 11.2 confidence_band: likely confidence_score: 71 horizon_days: 28 evaluated_on: "2026-09-12" meta: { total_returned: 1, note: null } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/movers: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Analytics] operationId: getMovers summary: Get top movers description: | Pages ranked by how much a metric moved between the window and the prior window of the same length (or the same window last year). Each row includes the number of meaningful changes detected on the page in the window. Position is lower-is-better, so a negative position delta is an improvement and `direction=up` always means improved. parameters: - name: metric in: query schema: { type: string, enum: [clicks, impressions, position, ctr, key_events], default: clicks } - name: start_date in: query description: Window start (YYYY-MM-DD). Defaults to 27 days before end_date (a 28-day window). schema: { type: string, format: date } - $ref: "#/components/parameters/EndDate" - name: comparison in: query schema: { type: string, enum: [previous-period, previous-year], default: previous-period } - name: direction in: query description: up (improved), down (declined) or both. schema: { type: string, enum: [up, down, both], default: both } - name: limit in: query schema: { type: integer, minimum: 1, maximum: 50, default: 20 } - name: min_impressions in: query description: Ignore pages under this many impressions in both windows. schema: { type: integer, minimum: 0, default: 0 } - $ref: "#/components/parameters/TagIds" responses: "200": description: Movers, largest absolute delta first. content: application/json: schema: { $ref: "#/components/schemas/MoversResult" } example: metric: clicks position_note: null window: { start: "2026-09-11", end: "2026-10-08" } prior_window: { start: "2026-08-14", end: "2026-09-10" } movers: - page_id: 48213 current: 1284 prior: 902 delta: 382 delta_pct: 42.4 current_impressions: 40211 page_path: /services/hydroseeding/ changes_detected_in_window: 3 "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/analytics: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Analytics] operationId: getProjectAnalytics summary: Get project analytics description: | Totals across all pages in the project, or a filtered subset: clicks, impressions, users, key events, page views, CTR and average position, plus a per-date change summary with impact band counts and an optional daily time series. Projects without Google connected return zero traffic. parameters: - name: search in: query description: Filter pages by URL path (partial match). schema: { type: string } - $ref: "#/components/parameters/TagIds" - $ref: "#/components/parameters/HasPageChangeOn" - $ref: "#/components/parameters/StartDate30" - $ref: "#/components/parameters/EndDate" - $ref: "#/components/parameters/Source" - $ref: "#/components/parameters/ViewScope" - name: comparison in: query description: Adds a comparison block with prior-window metrics and percent changes. schema: { type: string, enum: [none, previous-period, previous-year], default: none } - name: min_band in: query description: Only count changes at or above this band in the change summary. schema: { $ref: "#/components/schemas/ImpactBand" } - $ref: "#/components/parameters/IncludeTimeSeries" responses: "200": description: Project analytics. content: application/json: schema: { $ref: "#/components/schemas/ProjectAnalytics" } example: project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com, url: https://acme.com } date_range: { start: "2026-09-08", end: "2026-10-08" } source: all view_scope: page metrics: clicks: 18422 impressions: 611093 position: 14.2 users: 9311 key_events: 402 page_views: 22870 source: all view_scope: page ctr_percent: 3.01 pages_count: 212 page_change_summary: totals: { changes_count: 87, pages_count: 31 } impact_scored: true by_date: "2026-10-07": changes_count: 12 pages_count: 4 new_count: 3 edits_count: 8 removal_count: 1 by_field: { "Meta (title)": 2, "Text (p)": 10 } impact_bands: { notable: 2, high: 1 } overview: null fields: { "Text (p)": { count: 61 }, "Meta (title)": { count: 9 } } min_band: notable key_event_summary: page: { all: { count: 402 }, events: { form_submit: { count: 377 }, phone_click: { count: 25 } } } time_series: - { date: "2026-09-08", clicks: 590, impressions: 20114, users: 301, page_views: 744, key_events: 12, key_events_by_event: { form_submit: 11, phone_click: 1 }, position: 14.6 } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/queries: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Analytics] operationId: getSearchQueries summary: Get search queries for a page description: | Search Console queries that sent impressions or clicks to one page, with totals per query. `page_id` is required. Offset pagination with `page` and `per_page`. With a comparison, the response adds prior-window totals plus up to 20 new and 20 lost queries. parameters: - name: page_id in: query required: true description: The tracked page, from GET /projects/{project}/pages. schema: { type: integer } - name: search in: query description: Filter queries by text (partial match). schema: { type: string } - name: start_date in: query description: YYYY-MM-DD. Defaults to 29 days before end_date (a 30-day window). schema: { type: string, format: date } - $ref: "#/components/parameters/EndDate" - name: comparison in: query schema: { type: string, enum: [none, previous-period, previous-year], default: none } - name: order_by in: query schema: { type: string, enum: [clicks, impressions, position, ctr], default: clicks } - $ref: "#/components/parameters/OrderByDir" - $ref: "#/components/parameters/Page" - name: per_page in: query schema: { type: integer, minimum: 1, maximum: 100, default: 25 } responses: "200": description: Queries for the page. content: application/json: schema: { $ref: "#/components/schemas/QueriesResult" } example: page: { id: 48213, url: https://acme.com/services/hydroseeding/, path: /services/hydroseeding/ } date_range: { start: "2026-09-09", end: "2026-10-08" } data: - { query_id: 7781, query_text: hydroseeding denver, clicks: 311, impressions: 4120, position: 3.2, ctr: 0.0755 } meta: { total: 184, page: 1, per_page: 25, total_pages: 8, order_by: clicks, order_by_dir: desc } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/pages/{page}/changes: parameters: - $ref: "#/components/parameters/ProjectUuid" - $ref: "#/components/parameters/PageId" get: tags: [Changes] operationId: getPageChanges summary: Get changes for one page description: | Detected changes on one page, newest first, with full old and new values and the impact band. `impact_band` is null when the model did not score that change (usually because it fell below the meaningfulness floor). Offset pagination with `page` and `per_page`. parameters: - $ref: "#/components/parameters/StartDate30" - $ref: "#/components/parameters/EndDate" - name: min_band in: query description: Impact floor. Returns that band and every stronger one. schema: { $ref: "#/components/schemas/ImpactBand" } - $ref: "#/components/parameters/Page" - name: per_page in: query schema: { type: integer, minimum: 1, maximum: 200, default: 50 } responses: "200": description: A page of changes. content: application/json: schema: { $ref: "#/components/schemas/PageChangesResult" } example: page: { id: 48213, url: https://acme.com/services/hydroseeding/, path: /services/hydroseeding/ } date_range: { start: "2026-09-08", end: "2026-10-08" } data: - id: 9921045 detected_at: "2026-10-07 04:12:33" field_name: Meta (title) change_type: edit impact_band: high impact_score: 78.4 old_value: Hydroseeding Services | Acme new_value: Hydroseeding in Denver, Fast Germination | Acme meta: { total: 14, page: 1, per_page: 50, total_pages: 1, min_band: null, band_filter_applied: false, impact_scored: true } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/pages/{page}/change-summary: parameters: - $ref: "#/components/parameters/ProjectUuid" - $ref: "#/components/parameters/PageId" get: tags: [Changes] operationId: getPageChangeSummary summary: Get an AI summary of one day's changes description: | A plain-language summary of what changed on a page on one date. Generated on first request (this can take several seconds) and cached, so later calls return instantly. Most useful when a page has many field-level changes on one day. Free. parameters: - name: date in: query required: true description: A date (YYYY-MM-DD) with detected changes on this page. schema: { type: string, format: date } responses: "200": description: The summary. content: application/json: schema: { $ref: "#/components/schemas/PageChangeSummary" } example: page: { id: 48213, url: https://acme.com/services/hydroseeding/, path: /services/hydroseeding/ } date: "2026-10-07" change_count: 31 cached: false generated_at: "2026-10-09T14:02:11+00:00" summary: The page was rewritten around Denver service areas. The title and H1 now lead with location... "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/pages/{page}/analytics: parameters: - $ref: "#/components/parameters/ProjectUuid" - $ref: "#/components/parameters/PageId" get: tags: [Analytics] operationId: getPageAnalytics summary: Get page analytics description: | Search Console and GA4 metrics for one page, a per-date change summary with the strongest impact band per date, and an optional daily time series. With a comparison, `comparison.changes` holds percent changes per metric, except `position`, which is the absolute difference (previous minus current, so positive means the page moved up). parameters: - $ref: "#/components/parameters/StartDate30" - $ref: "#/components/parameters/EndDate" - $ref: "#/components/parameters/Source" - $ref: "#/components/parameters/ViewScope" - name: comparison in: query schema: { type: string, enum: [none, previous-period, previous-year], default: none } - $ref: "#/components/parameters/IncludeTimeSeries" responses: "200": description: Page analytics. content: application/json: schema: { $ref: "#/components/schemas/PageAnalytics" } example: page: { id: 48213, url: https://acme.com/services/hydroseeding/, path: /services/hydroseeding/, title: Hydroseeding Services | Acme } date_range: { start: "2026-09-08", end: "2026-10-08" } source: all view_scope: page metrics: clicks: 1284 impressions: 40211 position: 6.3 users: 702 key_events: 41 page_views: 1530 source: all ctr_percent: 3.19 bounce_rate_percent: 38.2 avg_time_on_page_seconds: 74.5 page_change_summary: totals: { changes_count: 14, dates_count: 2 } by_date: "2026-10-07": { changes_count: 12, by_field: { "Meta (title)": 1, "Text (p)": 11 }, max_impact_band: high } fields: { "Text (p)": { count: 12 }, "Meta (title)": { count: 2 } } key_event_summary: page: { all: { count: 41 }, events: { form_submit: { count: 41 } } } comparison: date_range: { start: "2026-08-08", end: "2026-09-07" } previous_metrics: { clicks: 902, impressions: 35190, users: 511, key_events: 30, position: 7.1 } changes: { clicks: 42.35, impressions: 14.27, position: 0.8, users: 37.38, key_events: 36.67 } "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/pages/{page}/live-check: parameters: - $ref: "#/components/parameters/ProjectUuid" - $ref: "#/components/parameters/PageId" post: tags: [Pages] operationId: liveCheck summary: Run a live check on a page description: | Fetches the page's stored URL right now and returns its HTTP status, title, meta description, first H1, canonical URL, robots directives (meta tag and X-Robots-Tag) and a noindex flag. Use it to confirm a finding before acting on it, since snapshots are taken on the crawl schedule. Sites billed per check: $0.005 per successful check (any HTTP status counts as success). A fetch that fails outright is not charged. Refused with 402 when the balance is empty. Free on plan sites. No request body. responses: "200": description: The live page. content: application/json: schema: { $ref: "#/components/schemas/LiveCheck" } example: page: { id: 48213, url: https://acme.com/services/hydroseeding/, path: /services/hydroseeding/ } live: fetched_at: "2026-10-09T14:10:02+00:00" http_status: 200 title: Hydroseeding in Denver, Fast Germination | Acme meta_description: Professional hydroseeding across the Denver metro... h1: Hydroseeding in Denver canonical: https://acme.com/services/hydroseeding/ robots_meta: null robots_header: null noindex: false "401": { $ref: "#/components/responses/Unauthorized" } "402": { $ref: "#/components/responses/PaymentRequired" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/alerts: parameters: - $ref: "#/components/parameters/ProjectUuid" get: tags: [Alerts] operationId: listAlerts summary: List alerts description: Every alert on the project, with what it watches, where it delivers and whether it has fired. responses: "200": description: Alerts, enabled first. content: application/json: schema: { $ref: "#/components/schemas/AlertList" } example: project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com } alerts: - uuid: 5c7d9e1f-2a3b-4c5d-8e9f-0a1b2c3d4e5f name: Page changes enabled: true trigger_type: change_detected conditions: [] frequency: instant schedule_time: "08:00" timezone: America/Denver scope: pages tagged Services change_fields: [meta, headings] change_actions: null recipients: [seo@acme.com] slack_channel: seo-alerts alert_state: ok last_triggered_at: "2026-10-07T10:30:00+00:00" last_checked_at: "2026-10-09T14:00:00+00:00" meta: { total: 1, enabled: 1, disabled: 0 } manage_url: https://app.pagepulse.dev/projects/9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00/alerts "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "429": { $ref: "#/components/responses/TooManyRequests" } post: tags: [Alerts] operationId: createAlert summary: Create an alert description: | Two kinds of alert: - **Template alerts** (`template`): `page_changes` fires when a meaningful change is detected and works on every project. `weekly_digest` sends a Monday summary and `monthly_digest` sends one on the 1st. Narrow page-change alerts with `change_fields` and `change_actions`. - **Threshold alerts** (`metric`): "tell me when clicks drop 20%". These read Google data, so the project must have `traffic_connected: true`. They notify once when the condition starts and once when it recovers. Delivery is email (`emails`, defaults to your own address), Slack (`slack_channel`, requires a workspace connected in the web app) or both. Scope with `tag_names` or `page_urls`, not both. Asking for an alert that already exists returns it with `status: already_existed` and changes nothing. requestBody: required: true content: application/json: schema: type: object properties: template: type: string enum: [page_changes, weekly_digest, monthly_digest] default: page_changes description: Ignored when metric is given. emails: type: array maxItems: 20 items: { type: string, format: email } slack_channel: type: string description: Channel name ("#seo-alerts" or "seo-alerts") or channel ID. metric: type: string enum: [clicks, impressions, users, key_events, avg_position, ctr] description: Makes this a threshold alert. direction: type: string default: drop description: Threshold alerts. "drop" or "gain" (also fall, decrease, decline, down, rise, increase, up, grow, improve). For avg_position, gain means the ranking improves. threshold_percent: type: number exclusiveMinimum: 0 default: 20 period_days: type: integer enum: [7, 14, 30, 60, 90] default: 30 frequency: type: string enum: [instant, daily, weekly, monthly, quarterly] description: Defaults to the template's cadence, or instant for threshold alerts. Digests cannot be instant. schedule_time: type: string description: Local time HH:MM, snapped to the half hour. Defaults to 08:00. examples: ["08:00", "16:30"] timezone: type: string description: IANA timezone, e.g. America/New_York. change_fields: type: array items: { type: string } description: Page-change alerts only. Group keys content, headings, links, meta (or raw field labels). change_actions: type: array items: { type: string, enum: [new, edit, removal] } description: Page-change alerts only. tag_names: type: array items: { type: string } description: Scope to pages carrying any of these tags. page_urls: type: array items: { type: string } description: Scope to these tracked pages (full URL or path). Entries that match no tracked page are excluded and reported in `warning`. examples: pageChanges: summary: Title and heading changes on service pages, to Slack value: { template: page_changes, change_fields: [meta, headings], tag_names: [Services], slack_channel: "#seo-alerts" } threshold: summary: Clicks drop 20% over 30 days value: { metric: clicks, direction: drop, threshold_percent: 20, period_days: 30, emails: [seo@acme.com] } responses: "201": description: Alert created, or the identical existing alert returned (check `status`). content: application/json: schema: { $ref: "#/components/schemas/AlertWriteResult" } example: status: active alert: uuid: 5c7d9e1f-2a3b-4c5d-8e9f-0a1b2c3d4e5f name: Clicks down 20% trigger_type: metric_drop condition: clicks drops by more than 20% over 30 days frequency: instant recipients: [seo@acme.com] slack_channel: null message: '"Clicks down 20%" is now active on acme.com, delivering to seo@acme.com...' manage_url: https://app.pagepulse.dev/projects/9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00/alerts "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } /projects/{project}/alerts/{alert}: parameters: - $ref: "#/components/parameters/ProjectUuid" - name: alert in: path required: true description: Alert UUID, from GET /projects/{project}/alerts. schema: { type: string, format: uuid } patch: tags: [Alerts] operationId: updateAlert summary: Update an alert description: | Only the fields you send are changed. `emails` replaces the whole recipient list. `slack_channel: "none"` removes Slack delivery. An empty `change_fields` or `change_actions` array resets that filter to all. The alert must keep at least one destination. Conditions, thresholds and page scope can only be edited in the web app, and alerts cannot be deleted through the API (disable them instead). requestBody: required: true content: application/json: schema: type: object properties: enabled: { type: boolean } change_fields: type: array items: { type: string } change_actions: type: array items: { type: string, enum: [new, edit, removal] } emails: type: array maxItems: 20 items: { type: string, format: email } slack_channel: type: string description: Channel name or ID, or "none" to remove Slack delivery. frequency: type: string enum: [instant, daily, weekly, monthly, quarterly] schedule_time: { type: string } timezone: { type: string } example: { enabled: false } responses: "200": description: Updated. content: application/json: schema: { $ref: "#/components/schemas/AlertWriteResult" } example: status: updated alert: uuid: 5c7d9e1f-2a3b-4c5d-8e9f-0a1b2c3d4e5f name: Page changes enabled: false frequency: instant recipients: [seo@acme.com] slack_channel: seo-alerts message: '"Page changes" updated: disabled.' manage_url: https://app.pagepulse.dev/projects/9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00/alerts "401": { $ref: "#/components/responses/Unauthorized" } "404": { $ref: "#/components/responses/NotFound" } "422": { $ref: "#/components/responses/ToolError" } "429": { $ref: "#/components/responses/TooManyRequests" } webhooks: change.detected: post: summary: A change was detected description: | Every detected change on every page in the organization's projects, including competitors, delivered in batches of up to 200 changes per project per request. The same changes as `GET /changes`: noise is screened out, and a site-wide edit arrives once, with `site_wide: true` and the number of pages it hit in `affected_page_count`. parameters: - $ref: "#/components/parameters/WebhookEventHeader" - $ref: "#/components/parameters/WebhookTimestampHeader" - $ref: "#/components/parameters/WebhookSignatureHeader" requestBody: required: true content: application/json: schema: allOf: - $ref: "#/components/schemas/WebhookEnvelope" - type: object properties: event: { const: change.detected } data: type: array maxItems: 200 items: { $ref: "#/components/schemas/WebhookChange" } example: id: evt_0f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a event: change.detected created_at: "2026-10-09T13:45:02+00:00" project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com, url: https://acme.com } data: - change_id: 9921045 page_id: 48213 url: https://acme.com/services/hydroseeding/ path: /services/hydroseeding/ field: Meta (title) change_type: edit old_value: Hydroseeding Services | Acme new_value: Hydroseeding in Denver, Fast Germination | Acme detected_at: "2026-10-07T04:12:33+00:00" responses: "2XX": description: Any 2xx marks the batch delivered. Anything else is retried on the next hourly run. change.notable: post: summary: A change scored notable or stronger description: | Changes the impact model scored notable, high or critical. Sent after the daily scoring run. Same fields as change.detected plus `impact_band` and `impact_score`. parameters: - $ref: "#/components/parameters/WebhookEventHeader" - $ref: "#/components/parameters/WebhookTimestampHeader" - $ref: "#/components/parameters/WebhookSignatureHeader" requestBody: required: true content: application/json: schema: allOf: - $ref: "#/components/schemas/WebhookEnvelope" - type: object properties: event: { const: change.notable } data: type: array maxItems: 200 items: allOf: - $ref: "#/components/schemas/WebhookChange" - type: object properties: impact_band: { type: string, enum: [notable, high, critical] } impact_score: { type: number } example: id: evt_1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d event: change.notable created_at: "2026-10-09T17:20:44+00:00" project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com, url: https://acme.com } data: - change_id: 9921045 page_id: 48213 url: https://acme.com/services/hydroseeding/ path: /services/hydroseeding/ field: Meta (title) change_type: edit old_value: Hydroseeding Services | Acme new_value: Hydroseeding in Denver, Fast Germination | Acme detected_at: "2026-10-07T04:12:33+00:00" impact_band: high impact_score: 78.4 responses: "2XX": description: Any 2xx marks the batch delivered. outcome.ready: post: summary: A change outcome was measured description: | A change window finished an evaluation horizon and the impact model measured how the page's metrics moved against the expected baseline. Sent after the daily evaluation run. parameters: - $ref: "#/components/parameters/WebhookEventHeader" - $ref: "#/components/parameters/WebhookTimestampHeader" - $ref: "#/components/parameters/WebhookSignatureHeader" requestBody: required: true content: application/json: schema: allOf: - $ref: "#/components/schemas/WebhookEnvelope" - type: object properties: event: { const: outcome.ready } data: type: array maxItems: 200 items: { $ref: "#/components/schemas/WebhookOutcome" } example: id: evt_2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e event: outcome.ready created_at: "2026-10-09T17:21:03+00:00" project: { uuid: 9b2f6c1e-4a7d-4f3b-9d8e-2c1a5b7e9f00, name: acme.com, url: https://acme.com } data: - page_id: 48213 url: https://acme.com/services/hydroseeding/ path: /services/hydroseeding/ horizon_days: 28 pre_period: ["2026-07-17", "2026-08-13"] post_period: ["2026-08-14", "2026-09-10"] lift: clicks: { pre_mean: 30.1, post_mean: 37.1, lift_pct: 23.3, improved_beyond_range: true, declined_beyond_range: false } impressions: { pre_mean: 1172.4, post_mean: 1303.9, lift_pct: 11.2, improved_beyond_range: false, declined_beyond_range: false } confidence_band: likely confidence_score: 71 explanation: - Intervention signal 0.82 across 4 edits. - Clicks rose 23.3% above the expected range. - 1 supporting signal(s) moved in the right direction. responses: "2XX": description: Any 2xx marks the batch delivered. ping: post: summary: Test event description: Sent only by POST /webhooks/{webhook}/test. `project` is null. parameters: - $ref: "#/components/parameters/WebhookEventHeader" - $ref: "#/components/parameters/WebhookTimestampHeader" - $ref: "#/components/parameters/WebhookSignatureHeader" requestBody: required: true content: application/json: schema: { $ref: "#/components/schemas/WebhookEnvelope" } example: id: evt_3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f event: ping created_at: "2026-10-09T14:20:00+00:00" project: null data: [{ message: Hello from Page Pulse }] responses: "2XX": description: The test call reports delivered=true. components: securitySchemes: bearerAuth: type: http scheme: bearer description: Personal access token from Settings, then API & MCP. The same token works with the MCP server. parameters: ProjectUuid: name: project in: path required: true description: Project UUID, from GET /projects. schema: { type: string, format: uuid } PageId: name: page in: path required: true description: Page id, from GET /projects/{project}/pages. schema: { type: integer } WebhookUuid: name: webhook in: path required: true description: Webhook endpoint UUID. schema: { type: string, format: uuid } StartDate30: name: start_date in: query description: YYYY-MM-DD. Defaults to 30 days before end_date. schema: { type: string, format: date } EndDate: name: end_date in: query description: YYYY-MM-DD. Defaults to yesterday. schema: { type: string, format: date } Page: name: page in: query description: Page number, starting at 1. schema: { type: integer, minimum: 1, default: 1 } OrderByDir: name: order_by_dir in: query schema: { type: string, enum: [asc, desc], default: desc } TagIds: name: tag_ids[] in: query description: Only pages carrying any of these tag ids (OR). Repeat the parameter, e.g. tag_ids[]=311&tag_ids[]=312. style: form explode: true schema: type: array items: { type: integer } HasPageChangeOn: name: has_page_change_on[] in: query description: Only pages with changes on all of these dates (YYYY-MM-DD, AND). Repeat the parameter for several dates. style: form explode: true schema: type: array items: { type: string, format: date } Source: name: source in: query description: Traffic source filter. schema: { type: string, enum: [all, organic], default: all } ViewScope: name: view_scope in: query description: page uses page-level users and key events; landing uses landing-page (session entry) metrics. schema: { type: string, enum: [page, landing], default: page } IncludeTimeSeries: name: include_time_series in: query description: Send 0 to leave out the daily time series when you only need totals. schema: { type: integer, enum: [0, 1], default: 1 } WebhookEventHeader: name: X-PagePulse-Event in: header required: true schema: { type: string, enum: [change.detected, change.notable, outcome.ready, ping] } WebhookTimestampHeader: name: X-PagePulse-Timestamp in: header required: true description: Unix time (seconds) when the request was signed. schema: { type: string } WebhookSignatureHeader: name: X-PagePulse-Signature in: header required: true description: sha256= followed by the hex HMAC-SHA256 of "{timestamp}.{raw body}", keyed with the endpoint secret. schema: { type: string, pattern: "^sha256=[0-9a-f]{64}$" } responses: Unauthorized: description: Missing, invalid or revoked token. content: application/json: schema: { $ref: "#/components/schemas/MessageError" } example: { message: Unauthenticated. } PaymentRequired: description: The balance is empty. Live checks on a site billed per check, and discovery on a pay-as-you-go-only account, are refused until you top up. content: application/json: schema: { $ref: "#/components/schemas/ToolErrorBody" } example: { error: "Your pay-as-you-go balance is empty. Top up at https://app.pagepulse.dev/organization/billing?tab=credits to run live checks and discovery." } NotFound: description: The project, page, alert or webhook does not exist or belongs to another organization. content: application/json: schema: { $ref: "#/components/schemas/Error" } examples: tool: { value: { error: Project not found or access denied. } } model: { value: { message: "No query results for model [App\\Models\\WebhookEndpoint]." } } ToolError: description: The request was understood but refused. The `error` text says why and what to change. content: application/json: schema: { $ref: "#/components/schemas/ToolErrorBody" } example: { error: At most 200 URLs per call (250 given). Split the list into batches. } ValidationError: description: Request validation failed. content: application/json: schema: { $ref: "#/components/schemas/ValidationErrorBody" } example: message: The selected check every days is invalid. errors: { check_every_days: [The selected check every days is invalid.] } TooManyRequests: description: Rate limit exceeded (the REST API allows 60 requests per minute per user). headers: Retry-After: description: Seconds until you can retry. schema: { type: integer } X-RateLimit-Limit: schema: { type: integer } X-RateLimit-Remaining: schema: { type: integer } content: application/json: schema: { $ref: "#/components/schemas/MessageError" } example: { message: Too Many Attempts. } schemas: ImpactBand: type: string enum: [noise, low, notable, high, critical] description: | noise: cosmetic or trivial edits. low: minor edits. notable: a meaningful single edit, the usual floor. high: a substantial change, often a cluster of edits on one page. critical: the largest changes. ToolErrorBody: type: object required: [error] properties: error: { type: string } MessageError: type: object required: [message] properties: message: { type: string } ValidationErrorBody: type: object required: [message, errors] properties: message: { type: string } errors: type: object additionalProperties: type: array items: { type: string } Error: oneOf: - $ref: "#/components/schemas/ToolErrorBody" - $ref: "#/components/schemas/MessageError" Account: type: object properties: organization: { type: string } plan: { type: [string, "null"], description: "Plan tier key." } plan_label: { type: [string, "null"] } pay_as_you_go: { type: boolean, description: "True when anything on the account can draw down the balance: a pay-as-you-go-only account, or a plan account with pay as you go turned on (even before any site is moved to it)." } balance_usd: { type: number, description: "Prepaid balance. Goes negative during the grace period." } monitoring_paused: { type: boolean, description: "True when scheduled monitoring stopped because the grace period ended." } grace_period_ends_at: type: [string, "null"] format: date-time description: When monitoring will pause if the balance stays at or below zero. Null when not in a grace period or already paused. auto_replenish: type: object properties: enabled: { type: boolean } amount_usd: { type: [number, "null"] } monthly_cap_usd: { type: [number, "null"] } prices_usd: type: object properties: page_check: { type: number } live_check: { type: number } discovery: { type: number } UsageLine: type: object properties: quantity: { type: integer } cost_usd: { type: number } Usage: type: object properties: start_date: { type: string, format: date } end_date: { type: string, format: date } total_cost_usd: { type: number } by_type: type: object description: Keyed by usage type. Types with no usage in the range are left out. properties: page_check: { $ref: "#/components/schemas/UsageLine" } live_check: { $ref: "#/components/schemas/UsageLine" } discovery: { $ref: "#/components/schemas/UsageLine" } by_project: type: array description: Discovery is not tied to a project, so it appears with a null project_uuid. items: type: object properties: project_uuid: { type: [string, "null"] } name: { type: [string, "null"] } quantity: { type: integer } cost_usd: { type: number } WebhookEventName: type: string enum: [change.detected, change.notable, outcome.ready] Webhook: type: object properties: uuid: { type: string, format: uuid } url: { type: string, format: uri } events: type: array items: { $ref: "#/components/schemas/WebhookEventName" } enabled: { type: boolean } last_delivered_at: { type: [string, "null"], format: date-time } last_failed_at: { type: [string, "null"], format: date-time } last_error: { type: [string, "null"] } disabled_at: type: [string, "null"] format: date-time description: Set when the endpoint was switched off after 24 consecutive failed delivery runs. WebhookTestResult: type: object properties: delivered: { type: boolean } error: { type: [string, "null"] } Discovery: type: object properties: site: { type: string } sitemap_url: { type: string } total_urls: { type: integer } path_groups: type: array description: Up to 40 groups by first path segment, largest first, with up to 3 sample paths each. items: type: object properties: path: { type: string } count: { type: integer } samples: type: array items: { type: string } root_pages: type: array items: { type: string } all_paths: type: [array, "null"] description: Every unique path, or null when there are more than 300. items: { type: string } next_step: { type: string } ProjectRef: type: object properties: uuid: { type: string, format: uuid } name: { type: string } Project: type: object properties: uuid: { type: string, format: uuid } name: { type: string } url: { type: string } traffic_connected: { type: boolean, description: "False for crawl-only projects (no Search Console or GA4)." } is_demo: { type: boolean, description: "Sample data created at signup. Not your site; cannot be modified." } billing: type: string enum: [plan, pay_as_you_go] description: "plan: covered by the account's plan, with the full app. pay_as_you_go: billed per check from the balance, data only." capabilities: { type: string } CreateProjectResult: type: object properties: status: { type: string, enum: [created, already_tracked] } project: type: object properties: uuid: { type: string, format: uuid } name: { type: string } url: { type: string } traffic_connected: { type: boolean } message: { type: string } alerting: type: object additionalProperties: { type: string } PageList: type: object properties: date_range: { $ref: "#/components/schemas/DateRange" } data: type: array items: type: object properties: id: { type: integer } url: { type: string } path: { type: string } title: { type: [string, "null"] } crawl_status: { type: string, enum: [ok, failing] } crawl_failure_reason: { type: [string, "null"] } last_crawl_failed_at: { type: [string, "null"] } tags: type: array items: { type: string } clicks: { type: integer } impressions: { type: integer } position: { type: [number, "null"] } meta: { $ref: "#/components/schemas/OffsetMeta" } OffsetMeta: type: object properties: total: { type: integer } page: { type: integer } per_page: { type: integer } total_pages: { type: number } order_by: { type: string } order_by_dir: { type: string } DateRange: type: object properties: start: { type: string, format: date } end: { type: string, format: date } AddPagesResult: type: object properties: project: { $ref: "#/components/schemas/ProjectRef" } summary: type: object properties: added: { type: integer } already_tracked: { type: integer } rejected: { type: integer } tags_applied: type: array items: { type: string } results: type: array items: type: object properties: url: { type: string } status: { type: string, enum: [added, already_tracked, rejected] } page_id: { type: integer } reason: { type: string, description: "Only on rejected rows." } message: { type: string } RemovePagesResult: type: object properties: project: { $ref: "#/components/schemas/ProjectRef" } summary: type: object properties: removed: { type: integer } not_found: { type: integer } results: type: array items: type: object properties: url: { type: string } status: { type: string, enum: [removed, not_found] } ChangeSearchResult: type: object properties: data: type: array items: type: object properties: id: { type: integer } page_id: { type: integer } page_path: { type: string } detected_at: { type: string, description: "UTC, Y-m-d H:i:s." } field_name: { type: string, description: "e.g. Meta (title), Heading (h1), Text (p), Link (Internal)." } change_type: { type: string, enum: [new, edit, removal, unknown] } impact_band: { oneOf: [{ $ref: "#/components/schemas/ImpactBand" }, { type: "null" }] } impact_score: { type: [number, "null"], description: "0 to 100." } change_group_id: { type: string, description: "Shared by rows that are the same edit (same field, value and day) on different pages." } affected_page_count: { type: integer } old_value: { type: [string, "null"], description: "Truncated to 300 characters." } new_value: { type: [string, "null"], description: "Truncated to 300 characters." } site_wide: { type: boolean, description: "True when the change is one site-wide edit shown once for every page it hit." } meta: type: object properties: date_range: { $ref: "#/components/schemas/DateRange" } limit: { type: integer } next_cursor: { type: [integer, "null"], description: "Pass as cursor to get the next page. Null on the last page." } min_band: { type: [string, "null"] } band_filter_applied: { type: boolean } impact_scored: { type: boolean } warning: { type: string } PageChangesResult: type: object properties: page: type: object properties: id: { type: integer } url: { type: string } path: { type: string } date_range: { $ref: "#/components/schemas/DateRange" } data: type: array items: type: object properties: id: { type: integer } detected_at: { type: string } field_name: { type: string } change_type: { type: string, enum: [new, edit, removal, unknown] } impact_band: { oneOf: [{ $ref: "#/components/schemas/ImpactBand" }, { type: "null" }] } impact_score: { type: [number, "null"] } old_value: { type: [string, "null"] } new_value: { type: [string, "null"] } meta: type: object properties: total: { type: integer } page: { type: integer } per_page: { type: integer } total_pages: { type: number } min_band: { type: [string, "null"] } band_filter_applied: { type: boolean } impact_scored: { type: boolean } warning: { type: string } PageChangeSummary: type: object properties: page: type: object properties: id: { type: integer } url: { type: string } path: { type: string } date: { type: string, format: date } change_count: { type: integer } cached: { type: boolean } generated_at: { type: [string, "null"], format: date-time } summary: { type: string } OutcomesResult: type: object properties: window: { $ref: "#/components/schemas/DateRange" } outcomes: type: array items: type: object properties: page_id: { type: integer } page_path: { type: string } changed_on: { type: string, format: date } dominant_fields: type: array items: { type: string } change_impact_band: { type: [string, "null"] } clicks_lift_pct: { type: [number, "null"], description: "Negative means a decline." } impressions_lift_pct: { type: [number, "null"] } confidence_band: { type: string, enum: [possible, likely, high] } confidence_score: { type: number } horizon_days: { type: integer } evaluated_on: { type: [string, "null"], format: date } meta: type: object properties: total_returned: { type: integer } note: { type: [string, "null"] } MoversResult: type: object properties: metric: { type: string } position_note: { type: [string, "null"] } window: { $ref: "#/components/schemas/DateRange" } prior_window: { $ref: "#/components/schemas/DateRange" } movers: type: array items: type: object properties: page_id: { type: integer } current: { type: [number, "null"] } prior: { type: [number, "null"] } delta: { type: number } delta_pct: { type: [number, "null"] } current_impressions: { type: integer } page_path: { type: [string, "null"] } changes_detected_in_window: { type: integer } Metrics: type: object description: ctr_percent is a percentage (3.01 means 3.01%). avg_time_on_page_seconds is in seconds. Position is lower-is-better. properties: clicks: { type: integer } impressions: { type: integer } position: { type: [number, "null"] } users: { type: integer } key_events: { type: integer } page_views: { type: integer } ctr_percent: { type: number } bounce_rate_percent: { type: number } avg_time_on_page_seconds: { type: number } source: { type: string } view_scope: { type: string } ProjectAnalytics: type: object properties: project: type: object properties: uuid: { type: string } name: { type: string } url: { type: string } date_range: { $ref: "#/components/schemas/DateRange" } source: { type: string } view_scope: { type: string } metrics: { $ref: "#/components/schemas/Metrics" } pages_count: { type: integer } page_change_summary: type: object properties: totals: type: object properties: changes_count: { type: integer } pages_count: { type: integer } impact_scored: { type: boolean } by_date: type: object description: Keyed by date (YYYY-MM-DD). additionalProperties: type: object properties: changes_count: { type: integer } pages_count: { type: integer } new_count: { type: integer } edits_count: { type: integer } removal_count: { type: integer } by_field: type: object additionalProperties: { type: integer } impact_bands: type: object description: Change counts per band. Present only on impact-scored projects. additionalProperties: { type: integer } overview: {} fields: type: object additionalProperties: type: object properties: count: { type: integer } min_band: { type: [string, "null"] } key_event_summary: { type: object } comparison: type: object properties: mode: { type: string } date_range: { $ref: "#/components/schemas/DateRange" } metrics: { $ref: "#/components/schemas/Metrics" } changes: type: object description: Percent change per metric, keyed like clicks_change_percent. additionalProperties: { type: number } position_note: { type: string } warning: { type: string } time_series: type: array items: { $ref: "#/components/schemas/TimeSeriesPoint" } TimeSeriesPoint: type: object properties: date: { type: string, format: date } clicks: { type: integer } impressions: { type: integer } users: { type: integer } page_views: { type: integer } key_events: { type: integer } key_events_by_event: type: object additionalProperties: { type: integer } position: { type: [number, "null"] } PageAnalytics: type: object properties: page: type: object properties: id: { type: integer } url: { type: string } path: { type: string } title: { type: [string, "null"] } date_range: { $ref: "#/components/schemas/DateRange" } source: { type: string } view_scope: { type: string } metrics: { $ref: "#/components/schemas/Metrics" } page_change_summary: type: object properties: totals: type: object properties: changes_count: { type: integer } dates_count: { type: integer } by_date: type: object additionalProperties: type: object properties: changes_count: { type: integer } by_field: type: object additionalProperties: { type: integer } max_impact_band: { type: [string, "null"] } fields: type: object additionalProperties: type: object properties: count: { type: integer } key_event_summary: { type: object } time_series: type: array items: { $ref: "#/components/schemas/TimeSeriesPoint" } comparison: type: object properties: date_range: { $ref: "#/components/schemas/DateRange" } previous_metrics: { $ref: "#/components/schemas/Metrics" } changes: type: object description: Percent change per metric; for position, the absolute difference (previous minus current). additionalProperties: { type: [number, "null"] } QueriesResult: type: object properties: page: type: object properties: id: { type: integer } url: { type: string } path: { type: string } date_range: { $ref: "#/components/schemas/DateRange" } data: type: array items: type: object properties: query_id: { type: integer } query_text: { type: string } clicks: { type: integer } impressions: { type: integer } position: { type: number } ctr: { type: number, description: "Ratio (0.0755 means 7.55%)." } meta: { $ref: "#/components/schemas/OffsetMeta" } comparison: type: object properties: mode: { type: string } date_range: { $ref: "#/components/schemas/DateRange" } totals: type: object properties: clicks: { type: integer } impressions: { type: integer } new_queries: type: array items: { $ref: "#/components/schemas/QueryShift" } lost_queries: type: array items: { $ref: "#/components/schemas/QueryShift" } QueryShift: type: object properties: query_text: { type: string } clicks: { type: integer } impressions: { type: integer } position: { type: number } LiveCheck: type: object properties: page: type: object properties: id: { type: integer } url: { type: string } path: { type: string } live: type: object properties: fetched_at: { type: string, format: date-time } http_status: { type: integer } title: { type: [string, "null"] } meta_description: { type: [string, "null"] } h1: { type: [string, "null"] } canonical: { type: [string, "null"] } robots_meta: { type: [string, "null"] } robots_header: { type: [string, "null"] } noindex: { type: boolean } AlertList: type: object properties: project: { $ref: "#/components/schemas/ProjectRef" } alerts: type: array items: type: object properties: uuid: { type: string, format: uuid } name: { type: string } enabled: { type: boolean } trigger_type: { type: string } conditions: { type: [array, "null"] } frequency: { type: string } schedule_time: { type: [string, "null"] } timezone: { type: [string, "null"] } scope: { type: string } change_fields: { type: [array, "null"], items: { type: string } } change_actions: { type: [array, "null"], items: { type: string } } recipients: type: array items: { type: string } slack_channel: { type: [string, "null"] } alert_state: { type: [string, "null"], description: "ok or firing." } last_triggered_at: { type: [string, "null"], format: date-time } last_checked_at: { type: [string, "null"], format: date-time } meta: type: object properties: total: { type: integer } enabled: { type: integer } disabled: { type: integer } manage_url: { type: string } AlertWriteResult: type: object properties: status: { type: string, enum: [active, already_existed, updated] } alert: type: object properties: uuid: { type: string, format: uuid } name: { type: string } enabled: { type: boolean } trigger_type: { type: string } condition: { type: string } frequency: { type: string } recipients: type: [array, "null"] items: { type: string } slack_channel: { type: [string, "null"] } scope: { type: string } warning: { type: string, description: "Scope entries that matched nothing and were left out." } project: type: object properties: uuid: { type: string } name: { type: string } traffic_connected: { type: boolean } message: { type: string } manage_url: { type: string } WebhookEnvelope: type: object required: [id, event, created_at, project, data] properties: id: { type: string, description: "Unique per delivery attempt (evt_ plus a UUID). A retried batch gets a new id." } event: { type: string, enum: [change.detected, change.notable, outcome.ready, ping] } created_at: { type: string, format: date-time } project: type: [object, "null"] properties: uuid: { type: string, format: uuid } name: { type: string } url: { type: string } data: type: array items: { type: object } WebhookChange: type: object properties: change_id: { type: integer, description: "Stable. Use it to de-duplicate." } page_id: { type: integer } url: { type: string } path: { type: string } field: { type: string } change_type: { type: string, enum: [new, edit, removal, unknown] } old_value: { type: [string, "null"] } new_value: { type: [string, "null"] } detected_at: { type: string, format: date-time } site_wide: { type: boolean, description: "True when this one row stands for a site-wide edit." } affected_page_count: { type: integer, description: "Pages the edit hit: 1, or the site-wide count." } WebhookOutcome: type: object properties: page_id: { type: integer } url: { type: string } path: { type: string } horizon_days: { type: integer } pre_period: type: array description: "[start, end] dates." items: { type: [string, "null"], format: date } post_period: type: array items: { type: [string, "null"], format: date } lift: type: object description: Keyed by metric (clicks, impressions, position and others the model measured). additionalProperties: type: object properties: pre_mean: { type: number } post_mean: { type: number } lift_pct: { type: [number, "null"] } improved_beyond_range: { type: boolean } declined_beyond_range: { type: boolean } confidence_band: { type: string, enum: [possible, likely, high] } confidence_score: { type: [number, "null"] } explanation: type: [array, "null"] items: { type: string }