# PageAudit — full API reference > Generated from the catalog at https://pageaudit.online · build `29dc2143` > 2 endpoints · 2 structures · slice `/api/audits/:id/prompts` > Short index: https://pageaudit.online/llms.txt · Spec: https://pageaudit.online/openapi.json · MCP: https://pageaudit.online/mcp · Errors: https://pageaudit.online/errors · Status: https://pageaudit.online/status > Check what search engines can read on a web page. > Retrieve evidence, suggested changes and saved reports. Start without a key. - [Also available on PayAPI Market](https://payapi.market/api/pageaudit) ## Free and paid services - [Free allowances and current prices](https://pageaudit.online/api/pricing) - [Payment methods and conditions](https://pageaudit.online/api/billing) - [First request and payment recovery](https://pageaudit.online/skill.md) ## How to read - Every endpoint lists path, auth, parameters, body, response structure, errors and a call that runs. - `Pagina` is a reference: the fields are under **Structures**, at the end, once. - `(optional)` on a field means it may be absent; `(may be null)` means it comes with a null value. - 4xx/5xx errors under `/api/*` use RFC 9457 (`application/problem+json`) with `type`, `title`, `status`, `detail`, `instance` and `code` (catalog at `/errors` and `/errors.md`). - If any route or tool fails or returns an unexpected error, report it via `POST /api/contact` with `{"tipo":"problema","categoria":"erro_api","contexto":"METHOD /api/...","mensagem":"status and error received"}` (requires an account API key or OAuth token). - Slice what you need: `https://pageaudit.online/llms-full.txt?prefix=/api/` returns only that branch. ## Authentication - `credito` — Credit token in `Authorization: Bearer cred_…` or `X-Credito`. For recovered x402 funds, use the wallet credential mmw_… in Bearer or X-Wallet-Token, issued through /api/auth/wallet/agent/start and /api/auth/wallet/agent/token. - `none` — Public, no credential. - `guest` — Guest token (`POST /api/guest`) in `X-Guest-Token: pa_…`, `Authorization: Bearer pa_…` or `?guest_token=pa_…`. Only a token this site issued is accepted. A signed-in account (cookie) also works and takes precedence; after the claim the token owns nothing. An agent without an account can send the wallet credential instead (`Authorization: Bearer mmw_…`, from `POST /api/auth/wallet/agent/start`): the wallet owns tabs and audits like a guest, as `x402:
`, and they move to the account it is linked to. - `session` — Global account: HttpOnly cookie `__Host-mm-auth`, set when you sign in on this site's `/conta/global` page. An ended session answers 401 `session_ended` (it never falls back to the guest). Writes need the same Origin and `X-CSRF-Token` from `/api/auth/bootstrap`. No bearer token is issued to humans. - `organization` — Signed-in account session plus `X-Organization-Id`. The shared account checks current membership and that PageAudit is enabled for the organization. Writes also need the same Origin and `X-CSRF-Token` from `/api/auth/bootstrap`. - `token` — Operator token in `Authorization: Bearer …` (`METRICS_TOKEN`). - `github_app` — Only GitHub: the delivery is signed with the PageAudit GitHub App's webhook secret in `X-Hub-Signature-256`. ## Endpoints ## Agent prompts ### `POST /api/audits/:id/prompts` Generate a coding-agent prompt for one finding or the full audit. Read GET /api/prompts/quota before generation; the total depends on scope and existing rights. Three lifetime free units per account or anonymous network. A check uses one; full uses three. Extra units cost US$0.10 each. Active Starter, Pro and Agency plans include prompts while valid, within 60 requests/hour. No partial free debit: a full prompt needs three free units or is charged in full. The licensed prompt is saved for this owner and organization. Reopening the same selector is free even after plan expiry. Unverified checks are excluded: missing measurements are not purchasable correction evidence. Preserve its text and license; use it only for license.domain. Reuse the UUID v4 request_id and identical body after a delivery failure. Payment uses X-Credito or the x402 challenge. Never charge without the user's authorization. **Prepared results and when to use them** Use the assembled instructions directly instead of copying findings and writing a prompt yourself, with no model call needed to generate it. The initial allowance has three units: one for a finding or three for the full report. After that allowance, credit pays per unit and active plans can include prompts. Read the quote for the selected scope; reopening a saved prompt does not charge again. Review placeholders and proposed changes before applying them, since evidence comes from the saved audit rather than the repository. Use verification with the same owner to compare fixed and new findings after the change. Free audits already include findings, and the prompt does not edit the site on its own. - **URL:** `https://pageaudit.online/api/audits/:id/prompts` - **Auth:** `guest` — Guest token (`POST /api/guest`) in `X-Guest-Token: pa_…`, `Authorization: Bearer pa_…` or `?guest_token=pa_…`. Only a token this site issued is accepted. A signed-in account (cookie) also works and takes precedence; after the claim the token owns nothing. An agent without an account can send the wallet credential instead (`Authorization: Bearer mmw_…`, from `POST /api/auth/wallet/agent/start`): the wallet owns tabs and audits like a guest, as `x402:
`, and they move to the account it is linked to. **Path parameters** - `id` (string, required) — Owned saved audit ID. **Body** (`application/json`) - `scope` (string, required) — check or full. - `check_id` (string) — ID from the report's checks; required for check, absent for full. - `language` (string, required) — Language of the prompt instructions and check names: en for English, pt for Portuguese. - `request_id` (string, required) — New UUID v4 per generation. Keep it unchanged for retries. **Response `200`** Structure: `AgentPrompt`. - `id` (string) — Persistent prompt ID. Use GET /api/prompts/:id to reopen for free. - `saved` (bool) — True only after authorization and durable storage. - `license` (object) — id, version, domain and terms. Preserve the complete prompt text and license; use only for this domain. - `selector` (object) — Source, scope, language and finding selector. - `created_at` (string) — When this saved text was prepared. - `prompt` (string) — Text prepared from saved evidence, with selected observed field values, suggested changes and a verification request (POST /api/audit with compare_with and the same owner). Resource samples can be incomplete. No external AI call or new collection. This does not apply a code change. - `audit_id` (string, may be null) — Owned audit ID for page prompts. - `source` (string, may be null) — domain, weekly or search_console for project prompts. - `resource_id` (string, may be null) — Owned tab or site ID for project prompts. - `report_id` (string, may be null) — Saved weekly report ID, when applicable. - `check_ids` (string[]) — Checks included in the prompt. - `request_id` (string) — Client UUID v4 used to prevent a repeat debit. - `usage` (object) — units, via (free, plan, saved or payment method) and repeated. Reopening uses zero units. - `quota` (PromptQuota, may be null) — Updated allowance after generation; omitted on free reads. → see `PromptQuota` under **Structures**. - `_links` (object) — Absolute quota and source URLs; audit is retained for page prompts. **Errors** - `400` — Invalid body. - `401` — Authentication required or session ended. - `402` — Allowance spent; current quote and payment options. - `403` — Cookie writes require the same Origin and X-CSRF-Token. - `404` — Audit not found for this owner. - `409` — No eligible observed findings. Passing and unverified checks do not generate a prompt or charge. - `413` — Request or prompt too large. - `422` — The request_id was already used with different inputs. - `429` — Hourly ceiling reached. - `503` — Prompt service unavailable. Preserve request_id when retrying. **Example** ```sh curl -s "https://pageaudit.online/api/audits/$AUDIT/prompts" -H "X-Guest-Token: $PA" -H "Content-Type: application/json" -d '{"scope":"full","language":"en","request_id":"bbff3661-444a-42ce-ae53-6c25715a03f7"}' ``` ### `GET /api/audits/:id/prompts` List the saved prompts of an audit report, without generating or paying. At most 100 saved rows per page, plus up to three earlier free audit receipts. Follow _links.next. A legacy receipt has id=null and legacy=true; the matching generation recovers it without a debit. The result belongs to the authenticated owner and active organization. - **URL:** `https://pageaudit.online/api/audits/:id/prompts` - **Auth:** `guest` — Guest token (`POST /api/guest`) in `X-Guest-Token: pa_…`, `Authorization: Bearer pa_…` or `?guest_token=pa_…`. Only a token this site issued is accepted. A signed-in account (cookie) also works and takes precedence; after the claim the token owns nothing. An agent without an account can send the wallet credential instead (`Authorization: Bearer mmw_…`, from `POST /api/auth/wallet/agent/start`): the wallet owns tabs and audits like a guest, as `x402:
`, and they move to the account it is linked to. **Path parameters** - `id` (string, required) — Owned source ID. **Query** - `language` (string) — Prompt language: en (default) for English or pt for Portuguese. - `after` (string) — Cursor from _links.next of the preceding page. **Response `200`** - `items` (object[]) — id, selector, license.domain and created_at. Text is read separately. - `next` (string, may be null) — Next cursor or null. - `_links` (object) — Absolute next URL or null. **Errors** - `400` — Invalid language, source, report_id or cursor. - `401` — Authentication required. - `404` — Owned audit, tab, site or report not found. - `503` — Storage unavailable. **Example** ```sh curl -s "https://pageaudit.online/api/audits/$AUDIT/prompts?language=en" -H "X-Guest-Token: $PA" ``` ## Structures ### `AgentPrompt` - `id` (string) — Persistent prompt ID. Use GET /api/prompts/:id to reopen for free. - `saved` (bool) — True only after authorization and durable storage. - `license` (object) — id, version, domain and terms. Preserve the complete prompt text and license; use only for this domain. - `selector` (object) — Source, scope, language and finding selector. - `created_at` (string) — When this saved text was prepared. - `prompt` (string) — Text prepared from saved evidence, with selected observed field values, suggested changes and a verification request (POST /api/audit with compare_with and the same owner). Resource samples can be incomplete. No external AI call or new collection. This does not apply a code change. - `audit_id` (string, may be null) — Owned audit ID for page prompts. - `source` (string, may be null) — domain, weekly or search_console for project prompts. - `resource_id` (string, may be null) — Owned tab or site ID for project prompts. - `report_id` (string, may be null) — Saved weekly report ID, when applicable. - `check_ids` (string[]) — Checks included in the prompt. - `request_id` (string) — Client UUID v4 used to prevent a repeat debit. - `usage` (object) — units, via (free, plan, saved or payment method) and repeated. Reopening uses zero units. - `quota` (PromptQuota, may be null) — Updated allowance after generation; omitted on free reads. → see `PromptQuota` under **Structures**. - `_links` (object) — Absolute quota and source URLs; audit is retained for page prompts. ### `PromptQuota` - `free` (object) — limit, used, remaining, scope (account or network), resets_at=null. Three lifetime units; no daily reset. - `plan` (object, may be null) — Active PageAudit plan: id, valid_until and included=true. Null without one. - `unit_price_usd` (number) — Price of one extra prompt unit in USD. - `full_units` (int) — A full prompt uses three units. - `plans_url` (string) — Plan discovery URL. - `credit_url` (string) — Shared prepaid credit URL.