{
  "openapi": "3.1.0",
  "info": {
    "title": "audit.domains public API",
    "version": "1.5.0",
    "description": "Deterministic domain appraisals, comparable sales, bulk valuation, and recorded-sales search.\n\nDocument version 1.4.0. Since 1.4.0, `GET /api/v1/expiring` and `GET /api/v1/expired` are documented here (both routes shipped earlier without a contract entry), this document is also published byte-identically at https://audit.domains/.well-known/openapi.json, and every operation carries an `x-idempotency` note stating its retry semantics plainly. Since 1.3.0, `GET /api/v1/sales` serves only the curated verified corpus; the legacy `source=ledger` research source was retired so no browser-reachable database RPC can bypass the paid row-level research boundary.  Since 1.0.0 the surface gained `GET /api/v1/usage`, a per-key request limiter (answered with `Retry-After` and `X-RateLimit-Reset`), and a monthly API call allowance separate from the site's appraisal credits - reported by the `X-Credits-*` headers and refused with `402 api_quota_exhausted`. The path prefix stays `/v1`: the locked appraisal projection has not changed, key for key.\n\nWhat this document covers: the seven key-authenticated paths listed below - `/api/v1/appraise`, `/api/v1/comps`, `/api/v1/bulk`, `/api/v1/usage`, `/api/v1/sales`, `/api/v1/expiring`, `/api/v1/expired`. One further route exists under the same prefix and is NOT part of the public contract: `/api/v1/historical-sales/snapshots/active` is an internal serving seam for the website's own comparables snapshot - anonymous, unmetered, edge-cached, does not use the error envelope described here, and may change without a version bump. Do not build against it.\n\nNo key? A keyless $5 card lane for single appraisals is described in https://audit.domains/api/openapi-machine.json (POST https://audit.domains/api/machine/resolve); it is not part of this contract.\n\nAPI access is included with paid plans: every request requires an `ad_live_` API key (create one at https://audit.domains/profile?tab=api), keys work only on paid plans, and appraisal-producing calls consume the account's monthly API allowance. That allowance is SEPARATE from the appraisal credits the website meters: spending one does not spend the other, and a large batch through the API leaves the site quota untouched. When it is spent, calls answer `402 api_quota_exhausted` until the monthly reset. `X-Credits-Limit` / `X-Credits-Remaining` / `X-Credits-Reset` response headers report that allowance and the date it refills, on every response that reached the meter (a 200, or a 402 for a spent allowance); requests rejected before metering - a malformed body, a missing key, a per-IP 429 - carry no meter to report, and `GET /api/v1/usage` reads the same figures without spending a call. `X-RateLimit-Limit` / `X-RateLimit-Remaining` currently repeat those credit figures; those names will be redefined to report the per-key request limiter after an announced notice period of at least 30 days.\n\nKey scopes: a key is created with `read` or `write` scope. Endpoints that spend an API call (`/appraise`, `/comps`, `/bulk`) require a `write` key and answer `403 insufficient_scope` otherwise; `/sales`, `/usage`, `/expiring` and `/expired` accept either. Issue read-scoped keys to anything that only searches recorded sales or polls the allowance, so a leaked key from that integration cannot spend the account's API allowance.\n\nRequest limits: two limiters apply, and the tighter one decides. A per-address token bucket runs BEFORE the key is verified and is sized per endpoint - `/appraise` and `/comps` allow a burst of 10 then about 30 requests per minute, `/bulk` a burst of 4 then about 6 per minute, `/sales`, `/usage`, `/expiring` and `/expired` a burst of 30 then about 60 per minute. Behind it, each key has a fixed limit per 60-second window, by plan: Plus 60/min, Pro 120/min, Max 300/min. Because the per-address bucket sits in front, one address cannot reach the per-key figure on `/appraise`, `/comps` or `/bulk` at all: on `/appraise` a single address is held near 30/min whatever the plan allows, and the Max figure of 300/min is reachable only by calling from several addresses. Both limiters answer `429 rate_limited` with `Retry-After` (seconds); only the per-key limiter also sends `X-RateLimit-Reset` (Unix seconds), so the presence of that header is what distinguishes the two.\n\nDeterminism guarantee: the same domain on the same engine version always returns the same result. Every appraisal carries its ODVS hashes (appraisalHash, inputCommitment, resultDigest) so the result can be verified independently.",
    "contact": {
      "url": "https://audit.domains/contact"
    },
    "termsOfService": "https://audit.domains/terms"
  },
  "servers": [
    {
      "url": "https://audit.domains"
    }
  ],
  "security": [
    {
      "bearerKey": []
    },
    {
      "headerKey": []
    }
  ],
  "paths": {
    "/api/v1/batch-appraisal": {
      "post": {
        "summary": "Batch portfolio appraisal jobs: create (up to 1,000 names in chunks of 20 under one idempotency key), status, result and resume, on the API key's prepaid balance.",
        "operationId": "postBatchAppraisal",
        "x-idempotency": {
          "safe": false,
          "retry": "Create is idempotent by idempotencyKey: the same names under the same key return the same job and never charge twice; the same key with different names is idempotency_conflict (409). Credits are reserved per chunk (1 per fresh-run name, 0 per stored-served name) and the unspent part refunded."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "create",
                      "status",
                      "result",
                      "resume"
                    ]
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 253
                    },
                    "minItems": 1,
                    "maxItems": 1000,
                    "description": "create only: the portfolio."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "description": "create only: re-issuing with the same key resumes the same job."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "stored_first",
                      "fresh_all"
                    ],
                    "description": "create only: stored_first (default) serves stored figures at 0 credits."
                  },
                  "jobId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "status, result and resume: the jobId create returned."
                  },
                  "chunk": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "result only: one chunk's rows."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "bulk"
        ],
        "responses": {
          "200": {
            "description": "The job view for the action: create returns the plan and estimate, status the job and chunk states, result the per-name rows of completed chunks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "domains_required - Provide a non-empty 'domains' array. idempotency_key_required - This endpoint requires an idempotency key. invalid_domain - The domain is missing or not a valid hostname. invalid_job_id - The job id is not a job id. invalid_json - The request body is not valid JSON. too_many_domains - Too many domains for one call. unknown_action - That action is not part of this endpoint's protocol.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "credits_unavailable - The API key could not reserve credits for this job. paid_plan_required - API access is included with paid plans.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "job_not_found - No batch job with that id exists for this API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "409": {
            "description": "idempotency_conflict - This idempotency key already names a different request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "batch_failed - The batch job request failed server-side.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "api_auth_unavailable - Key verification is unreachable; the API fails closed. batch_store_unconfigured - Batch job persistence is not configured on this deployment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-rail-meter": {
      "post": {
        "security": [
          {
            "agentToken": []
          }
        ],
        "summary": "Meter one agent call against the live payment rails before anything settles, under the machine rails' agent token.",
        "operationId": "postAgentRailMeter",
        "x-idempotency": {
          "safe": false,
          "retry": "Idempotent per operationId: the first call records the metering decision (refusals included, charged 0); repeating the same operationId returns that first event with replay true and charges nothing again. The purchase path's debit is unchanged."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "operationId",
                  "product",
                  "rail"
                ],
                "properties": {
                  "operationId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:-]{8,128}$",
                    "description": "Your id for this call; repeating it returns the first event."
                  },
                  "product": {
                    "type": "string",
                    "description": "The catalog product, for example current_appraisal."
                  },
                  "rail": {
                    "type": "string",
                    "enum": [
                      "balance",
                      "card",
                      "cardAgent",
                      "x402"
                    ]
                  },
                  "grantId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "balance rail: the operator-funded grant to meter against."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "machine"
        ],
        "responses": {
          "200": {
            "description": "The metering decision: the event (operationId, product, rail, chargedMicrocredits, charged, refusal, replay) and settledMicrocredits for this agent. A refusal is a 200 with the refusal named and chargedMicrocredits 0.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json - The request body is not valid JSON. invalid_meter_request - The metering request is malformed. invalid_operation_id - The operationId is missing or outside the allowed shape.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "agent_token_invalid - The agent token is missing, unknown, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "agent_rail_meter_store_unavailable - The agent rail meter's event store is unreachable. agent_rail_meter_unconfigured - The agent rail meter is not configured on this deployment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cached-appraisal-aggregate": {
      "post": {
        "security": [],
        "summary": "Aggregate the cached appraisals for up to 50 names in one answer.",
        "operationId": "postCachedAppraisalAggregate",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The cached_appraisal_aggregate answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "domains_required - Provide a non-empty 'domains' array. invalid_json - The request body is not valid JSON. too_many_domains - Too many domains for one call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 50,
                    "description": "The names whose cached figures to aggregate."
                  }
                },
                "required": [
                  "domains"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/certificate-verdict": {
      "get": {
        "security": [],
        "summary": "Translate one certificate's verification read into a strict machine verdict.",
        "operationId": "getCertificateVerdict",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The certificate_machine_verdict answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_certificate_input - The certificate input is malformed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The full verifier URL printed on the certificate: https://audit.domains/verify/<serial>?p=<token>. Gives both checks."
            }
          },
          {
            "name": "serial",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The certificate serial alone. Gives the issuer check only, so integrity reads not_measured."
            }
          }
        ]
      }
    },
    "/api/v1/cached-appraisal-embed": {
      "get": {
        "security": [],
        "summary": "Return one name's cached appraisal as an embeddable payload: the stored figure (or the published catalog figure) with its methodology version, data edition and identity hash, labelled with its basis and never as verified, plus the paid next step at the live descriptor price.",
        "operationId": "getCachedAppraisalEmbed",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The cached_appraisal_embed answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_domain - The domain is missing or not a valid hostname.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "figure_not_stored - No stored figure is available for this name yet, so there is nothing cached to serve.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "figure_interval_invalid - The delivered figure's interval is not ordered low, fair, high. price_drift - The published descriptor price disagrees with the catalog price, so the surface refuses to serve rather than quote a drifted price.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 253,
              "description": "The domain whose cached figure to embed."
            }
          }
        ]
      }
    },
    "/api/v1/preflight-vet": {
      "get": {
        "security": [],
        "summary": "One free pre-flight check before a purchase decision on one name: the ask against the stored interval, registration and expiry read live from RDAP, DMARC presence, and an evidence band in which any component that failed to read is UNKNOWN.",
        "operationId": "getPreflightVet",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe. Answers are edge-cached for five minutes."
        },
        "responses": {
          "200": {
            "description": "The preflight_vet answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_domain - The domain is missing or not a valid hostname. invalid_ask_usd - askUsd is present but is not a non-negative number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 253,
              "description": "The domain the purchase decision is about."
            }
          },
          {
            "name": "askUsd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000,
              "description": "The asking price in USD, when the caller has one. Absent means the verdict reads no_ask_sourced."
            }
          }
        ]
      },
      "head": {
        "summary": "Same as GET without the body",
        "operationId": "headPreflightVet",
        "x-idempotency": {
          "safe": true,
          "retry": "HEAD runs the GET handler and discards the body; it spends nothing and is always safe to repeat."
        },
        "description": "HEAD runs the real GET handler and discards the body (RFC 9110). Status codes and headers are those of GET.",
        "responses": {
          "200": {
            "description": "Headers only, per RFC 9110. The GET handler runs and its status and headers are returned with no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            }
          },
          "400": {
            "description": "invalid_domain - The domain is missing or not a valid hostname. invalid_ask_usd - askUsd is present but is not a non-negative number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 253,
              "description": "The domain the purchase decision is about."
            }
          },
          {
            "name": "askUsd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000,
              "description": "The asking price in USD, when the caller has one. Absent means the verdict reads no_ask_sourced."
            }
          }
        ]
      }
    },
    "/api/v1/comps-embed": {
      "get": {
        "security": [],
        "summary": "Return the comparable-sales evidence embed for one name: the recorded sales the stored valuation itself used, each with the verified corpus row named as its source, plus the exact-comparables offer stating its catalog price and whether that product is sellable in production today.",
        "operationId": "getCompsEmbed",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The comps_embed answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_domain - The domain is missing or not a valid hostname.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "figure_not_stored - No stored figure is available for this name yet, so there is nothing cached to serve.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "comparable_missing_provenance - A comparable sale in the stored evidence no longer resolves to a source record, so the embed refuses rather than present evidence without provenance. price_drift - The published descriptor price disagrees with the catalog price, so the surface refuses to serve rather than quote a drifted price.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 253,
              "description": "The domain name to return the comps embed for."
            }
          }
        ]
      }
    },
    "/api/v1/comps-machine-translation": {
      "get": {
        "security": [],
        "summary": "Return the comparable sales recorded for one name in the canonical machine schema: integer cents with the USD figure derived from them, the verified corpus row named as each admitted sale's source reference, and any sale whose provenance cannot be admitted listed as rejected with its reason instead of dropped.",
        "operationId": "getCompsMachineTranslation",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The comps_machine_translation answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "invalid_domain - The domain is missing or not a valid hostname.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "figure_not_stored - No stored figure is available for this name yet, so there is nothing cached to serve.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 253,
              "description": "The domain whose recorded comparable sales to translate."
            }
          }
        ]
      }
    },
    "/api/v1/fresh-appraisal-aggregate": {
      "post": {
        "security": [],
        "summary": "Aggregate the fresh appraisal artifacts you already hold into one reconciliation: deliveries dedupe by their identity tuple with duplicates named, an artifact charged away from the catalog price is excluded as price drift, a broken figure interval is excluded, and the summary totals fair value and spend over the delivered artifacts only, operation ids listed.",
        "operationId": "postFreshAppraisalAggregate",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The fresh_appraisal_aggregate answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "artifacts_required - The request names no artifacts to aggregate. invalid_artifact - One artifact is not a complete fresh appraisal artifact. invalid_json - The request body is not valid JSON. too_many_artifacts - Too many artifacts in one aggregate request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "artifacts": {
                    "type": "array",
                    "description": "One to fifty fresh appraisal artifacts, each complete with domain, fairUsd, lowUsd, highUsd, methodologyVersion, dataEdition, evidencePolicy, appraisalHash, operationId and chargedMicrocredits.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "domain": {
                          "type": "string"
                        },
                        "fairUsd": {
                          "type": "number"
                        },
                        "lowUsd": {
                          "type": "number"
                        },
                        "highUsd": {
                          "type": "number"
                        },
                        "methodologyVersion": {
                          "type": "string"
                        },
                        "dataEdition": {
                          "type": "string"
                        },
                        "evidencePolicy": {
                          "type": "string"
                        },
                        "appraisalHash": {
                          "type": "string"
                        },
                        "operationId": {
                          "type": "string"
                        },
                        "chargedMicrocredits": {
                          "type": "number"
                        },
                        "rail": {
                          "type": "string",
                          "enum": [
                            "balance",
                            "card",
                            "cardAgent",
                            "x402"
                          ],
                          "description": "The rail the delivery was bought on; it sets the expected charge (balance $0.03, card and cardAgent $5, x402 $1). Absent means balance."
                        }
                      },
                      "required": [
                        "domain",
                        "fairUsd",
                        "lowUsd",
                        "highUsd",
                        "methodologyVersion",
                        "dataEdition",
                        "evidencePolicy",
                        "appraisalHash",
                        "operationId",
                        "chargedMicrocredits"
                      ]
                    }
                  }
                },
                "required": [
                  "artifacts"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/fresh-appraisal-translation": {
      "post": {
        "security": [],
        "summary": "Translate one fresh appraisal delivery you hold into the canonical machine record: the figure with its interval, the identity block marked immutable when materialized, and the charge block copied from the delivery, rail included, with the USD charge derived from the microcredits.",
        "operationId": "postFreshAppraisalTranslation",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The fresh_appraisal_translation answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "charge_invalid - The delivery's charge is not a non-negative integer number of microcredits. identity_field_missing - A required identity field of the delivery is missing or empty. invalid_delivery - The request is not a complete delivered appraisal. invalid_json - The request body is not valid JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "figure_interval_invalid - The delivered figure's interval is not ordered low, fair, high.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "fairUsd": {
                    "type": "number"
                  },
                  "lowUsd": {
                    "type": "number"
                  },
                  "highUsd": {
                    "type": "number"
                  },
                  "methodologyVersion": {
                    "type": "string"
                  },
                  "dataEdition": {
                    "type": "string"
                  },
                  "evidencePolicy": {
                    "type": "string"
                  },
                  "appraisalHash": {
                    "type": "string"
                  },
                  "operationId": {
                    "type": "string"
                  },
                  "rail": {
                    "type": "string",
                    "enum": [
                      "balance",
                      "card",
                      "cardAgent",
                      "x402",
                      "sandbox"
                    ]
                  },
                  "chargedMicrocredits": {
                    "type": "number"
                  }
                },
                "required": [
                  "domain",
                  "fairUsd",
                  "lowUsd",
                  "highUsd",
                  "methodologyVersion",
                  "dataEdition",
                  "evidencePolicy",
                  "appraisalHash",
                  "operationId",
                  "rail",
                  "chargedMicrocredits"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/machine-inventory-aggregate": {
      "post": {
        "security": [],
        "summary": "Build the machine inventory catalog over up to fifty names you name: a name enters only when it carries both a registry expiration read and a stored or published figure, and every other name is excluded with its reason (no expiration read, no valuation, duplicate), so the catalog count always reconciles to the requested count.",
        "operationId": "postMachineInventoryAggregate",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The machine_inventory_aggregate answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "domains_required - Provide a non-empty 'domains' array. invalid_json - The request body is not valid JSON. too_many_domains - Too many domains for one call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "One to fifty domain names to build the catalog over."
                  }
                },
                "required": [
                  "domains"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-readiness": {
      "get": {
        "security": [],
        "summary": "Recompute the purchase readiness verdict from the live lane conditions: an agent-alone purchase is completable only with at least one agent-alone rail proven open end to end (balance with operator funding and a scoped grant path, an enrolled agent card, or an open wallet rail), sellable products present, and the purchase pair discoverable on both published surfaces.",
        "operationId": "getPurchaseReadiness",
        "x-idempotency": {
          "safe": true,
          "retry": "Free: charges nothing, spends no API call and starts no engine run, so a blind retry is safe."
        },
        "responses": {
          "200": {
            "description": "The purchase_readiness_verdict answer, the same structured content the MCP tool of that name returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/appraise": {
      "post": {
        "summary": "Appraise one domain (1 API call, write scope)",
        "operationId": "appraiseDomain",
        "x-idempotency": {"safe": false, "retry": "Repeating the identical request (same key, same domain) within two minutes returns the stored answer with X-Credit-Charged: 0 and spends nothing twice (dedupe by question hash, migration 081). A failure after the charge refunds the call (X-Credit-Refunded). Outside the dedupe window a repeat is a new charged call."},
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["domain"],
                "properties": {
                  "domain": {
                    "type": "string",
                    "examples": ["example.com"],
                    "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$",
                    "maxLength": 253
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The locked public appraisal projection.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Appraisal"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/RequestBodyTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/AppraisalFailed"
          },
          "503": {
            "$ref": "#/components/responses/AuthUnavailable"
          }
        },
        "tags": ["appraisals"]
      }
    },
    "/api/v1/comps": {
      "parameters": [
        {
          "name": "domain",
          "in": "query",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$",
            "maxLength": 253
          }
        },
        {
          "name": "limit",
          "in": "query",
          "schema": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5,
            "default": 5
          }
        }
      ],
      "get": {
        "summary": "Comparable sales for a domain (1 API call, write scope)",
        "operationId": "getComps",
        "x-idempotency": {"safe": false, "retry": "Each successful call spends one API call and there is no dedupe window: a blind retry after a lost reply spends a second call. A failure after the charge refunds the call (X-Credit-Refunded)."},
        "responses": {
          "200": {
            "description": "Top comparable sales, indexed by the published methodology.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string"
                    },
                    "comps": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Comp"
                      }
                    },
                    "methodologyVersion": {
                      "type": ["string", "null"]
                    },
                    "dataEdition": {
                      "type": ["string", "null"]
                    },
                    "generatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/CompsFailed"
          },
          "503": {
            "$ref": "#/components/responses/AuthUnavailable"
          }
        },
        "tags": ["appraisals"]
      },
      "head": {
        "summary": "Same as GET without the body - still spends 1 API call",
        "operationId": "headComps",
        "x-idempotency": {"safe": true, "retry": "HEAD runs the GET handler and discards the body; it spends no API call and is always safe to repeat."},
        "description": "HEAD runs the real GET handler and discards the body (RFC 9110), so it runs the engine and debits one API call from the monthly allowance exactly as GET does. Do NOT use it as an uptime probe: GET /api/v1/usage spends nothing and is the probe to use. Status codes and headers are those of GET.",
        "responses": {
          "200": {
            "description": "Headers only, per RFC 9110. The GET handler runs and its status and headers are returned with no body, so every status GET can answer is reachable here too.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/CompsFailed"
          },
          "503": {
            "$ref": "#/components/responses/AuthUnavailable"
          }
        },
        "tags": ["appraisals"]
      }
    },
    "/api/v1/bulk": {
      "post": {
        "summary": "Appraise up to 20 domains (1 API call per domain, write scope; plan must include bulk)",
        "operationId": "bulkAppraise",
        "x-idempotency": {"safe": false, "retry": "Not idempotent: each call reserves and settles its own credits. Domains that fail server-side are refunded inside the same call; domains beyond the remaining allowance answer quota_exhausted per item and are never charged. A blind retry re-appraises and re-charges the successful domains."},
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["domains"],
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$",
                      "maxLength": 253
                    },
                    "minItems": 1,
                    "maxItems": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-domain results. Calls are reserved from the monthly API allowance for the batch up front; if the allowance does not cover every domain, the ones beyond it report quota_exhausted and were never charged, and calls for domains the engine failed on are refunded. A per-domain failure is reported here, not as a 4xx/5xx for the whole call.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": {
                            "type": "string"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "appraisal": {
                            "$ref": "#/components/schemas/Appraisal"
                          },
                          "error": {
                            "type": "string",
                            "enum": ["appraisal_failed", "quota_exhausted"],
                            "description": "Present when ok is false. appraisal_failed = the engine threw for this domain and its call was refunded. quota_exhausted = the allowance did not cover this domain, so it was never charged and never processed."
                          }
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Correlation id for this call; the same value as the X-Request-Id header."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestBulk"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/RequestBodyTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/AuthUnavailable"
          }
        },
        "tags": ["bulk"]
      }
    },
    "/api/v1/usage": {
      "get": {
        "summary": "This key's API allowance and counters (spends nothing, read scope)",
        "operationId": "getUsage",
        "x-idempotency": {"safe": true, "retry": "Read-only and spends nothing; safe to repeat and to poll, subject to the per-key request limit."},
        "description": "Read the monthly API call allowance without spending a call. The headers on a metered call report the allowance only after that call has been charged; this is the read to make before deciding to spend, and it is the endpoint to poll for liveness. The figures here are the API call allowance, NOT the website's appraisal credits: the two are metered separately and spending one does not spend the other. Subject to the same key verification, paid-plan gate and per-key request limit as every other endpoint; a read-scoped key is enough, and a write-scoped key is accepted too.",
        "responses": {
          "200": {
            "description": "Plan, API call allowance, and this key's counters.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "planId": {
                      "type": "string",
                      "enum": ["core", "scale", "genesis"]
                    },
                    "credits": {
                      "type": "object",
                      "description": "The monthly API call allowance, not the site's appraisal credits.",
                      "properties": {
                        "limit": {
                          "type": ["integer", "null"],
                          "description": "API calls included per month: Plus 500, Pro 2,500, Max 15,000. null when the deployment reports no figure."
                        },
                        "remaining": {
                          "type": ["integer", "null"],
                          "description": "API calls left in the current month. null when the deployment reports no figure."
                        },
                        "resetsAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "First instant of the next UTC month, when the allowance refills."
                        }
                      }
                    },
                    "key": {
                      "type": "object",
                      "properties": {
                        "prefix": {
                          "type": "string",
                          "description": "Masked key prefix. The plaintext key is never stored and cannot be returned."
                        },
                        "callsToday": {
                          "type": "integer",
                          "description": "Metered API calls made with this key today (the database's current date, UTC). Reading this endpoint is deliberately not recorded, so polling it never moves the number."
                        },
                        "createdAt": {
                          "type": ["string", "null"],
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredReadOnly"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/AuthUnavailable"
          }
        },
        "tags": ["account"]
      },
      "head": {
        "summary": "Same as GET without the body",
        "operationId": "headUsage",
        "x-idempotency": {"safe": true, "retry": "HEAD runs the GET handler and discards the body; it spends nothing and is always safe to repeat."},
        "description": "HEAD runs the real GET handler and discards the body (RFC 9110). It spends no API call, so it is safe as an uptime probe. Status codes and headers are those of GET.",
        "responses": {
          "200": {
            "description": "Headers only, per RFC 9110. The GET handler runs and its status and headers are returned with no body, so every status GET can answer is reachable here too.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredReadOnly"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/AuthUnavailable"
          }
        },
        "tags": ["account"]
      }
    },
    "/api/v1/sales": {
      "parameters": [
        {
          "name": "q",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Substring match on domain (verified source also matches category/venue)."
        },
        {
          "name": "tld",
          "in": "query",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "minPrice",
          "in": "query",
          "schema": {
            "type": "integer"
          }
        },
        {
          "name": "maxPrice",
          "in": "query",
          "schema": {
            "type": "integer"
          }
        },
        {
          "name": "yearFrom",
          "in": "query",
          "schema": {
            "type": "integer"
          }
        },
        {
          "name": "yearTo",
          "in": "query",
          "schema": {
            "type": "integer"
          }
        },
        {
          "name": "venue",
          "in": "query",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "sort",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": ["price", "date", "domain"],
            "default": "price"
          }
        },
        {
          "name": "dir",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": ["asc", "desc"],
            "default": "desc"
          }
        },
        {
          "name": "page",
          "in": "query",
          "schema": {
            "type": "integer",
            "minimum": 1,
            "default": 1
          }
        },
        {
          "name": "pageSize",
          "in": "query",
          "schema": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 50
          }
        },
        {
          "name": "source",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": ["verified"],
            "default": "verified"
          },
          "description": "Recorded-sales source. `verified` is the curated, screened corpus used by audit.domains. The legacy `ledger` source is retired and returns 503 source_unavailable."
        }
      ],
      "get": {
        "summary": "Search recorded domain sales (spends nothing, read scope; paid plan required)",
        "operationId": "searchSales",
        "x-idempotency": {"safe": true, "retry": "Read-only and spends nothing; safe to repeat. Pagination is by page/pageSize, and the Link header carries rel=next while hasMore is true."},
        "responses": {
          "200": {
            "description": "One page of curated verified recorded sales, including facets and aggregates over the filtered result set.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "Link": {
                "description": "RFC 8288 pagination: present when hasMore is true, carrying rel=\"next\" for the following page. A convenience view of the page/pageSize/hasMore body fields.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": ["verified"]
                    },
                    "total": {
                      "type": "integer",
                      "description": "Rows matching the filters across all pages."
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SaleRecord"
                      }
                    },
                    "stats": {
                      "type": ["object", "null"],
                      "description": "Aggregates over the whole filtered set, not just this page. null when nothing matched.",
                      "properties": {
                        "median": {
                          "type": "number"
                        },
                        "highest": {
                          "type": "number"
                        },
                        "totalValue": {
                          "type": "number"
                        }
                      }
                    },
                    "facets": {
                      "type": "object",
                      "description": "Filter values present in the curated verified corpus.",
                      "properties": {
                        "tlds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "years": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredReadOnly"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/SalesUnavailable"
          },
          "503": {
            "description": "source_unavailable when a retired sales source such as source=ledger is requested, or api_auth_unavailable when key verification is unreachable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": ["sales"]
      },
      "head": {
        "summary": "Same as GET without the body",
        "operationId": "headSales",
        "x-idempotency": {"safe": true, "retry": "HEAD runs the GET handler and discards the body; it spends nothing and is always safe to repeat."},
        "description": "HEAD runs the real GET handler and discards the body (RFC 9110). It spends no API call. Status codes and headers are those of GET.",
        "responses": {
          "200": {
            "description": "Headers only, per RFC 9110. The GET handler runs and its status and headers are returned with no body, so every status GET can answer is reachable here too.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "X-Credits-Limit": {
                "$ref": "#/components/headers/X-Credits-Limit"
              },
              "X-Credits-Remaining": {
                "$ref": "#/components/headers/X-Credits-Remaining"
              },
              "X-Credits-Reset": {
                "$ref": "#/components/headers/X-Credits-Reset"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredReadOnly"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/SalesUnavailable"
          },
          "503": {
            "description": "source_unavailable (the research ledger is not published yet; the body carries `source`) or api_auth_unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": ["sales"]
      }
    },
    "/api/v1/expiring": {
      "parameters": [
        { "name": "stage", "in": "query", "schema": { "type": "string", "enum": ["grace", "redemption", "pendingDelete", "droppingToday", "droppedAvailable", "auction", "closeout", "zoneExit"] }, "description": "Only rows in this lifecycle stage." },
        { "name": "tld", "in": "query", "schema": { "type": "string" }, "description": "Only rows under this TLD." },
        { "name": "sort", "in": "query", "schema": { "type": "string", "enum": ["ratio", "signal", "droppingSoonest"], "default": "ratio" }, "description": "ratio sorts by mispricing ratio (the flagship order), signal by signal score, droppingSoonest by estimated drop date." },
        { "name": "maxAsk", "in": "query", "schema": { "type": "number" }, "description": "Only rows with a recorded ask at or under this USD amount." },
        { "name": "maxRatio", "in": "query", "schema": { "type": "number" }, "description": "Only rows whose mispricing ratio is at or under this value." },
        { "name": "minConfidence", "in": "query", "schema": { "type": "number" }, "description": "Only rows whose appraisal confidence is at or above this value." },
        { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 100 } },
        { "name": "cursor", "in": "query", "schema": { "type": "string" }, "description": "Opaque pagination cursor from a previous response's nextCursor." }
      ],
      "get": {
        "summary": "Expiring and lifecycle-listed domains (spends nothing, read scope; paid plan required)",
        "operationId": "listExpiring",
        "x-idempotency": { "safe": true, "retry": "Read-only and spends nothing; safe to repeat. Pagination is by the opaque cursor: pass nextCursor back as cursor for the following page." },
        "description": "Expiring and lifecycle-listed domains from the committed expiring snapshot: the same build-time artifact the /expiring pages render, so answers are deterministic and no appraisal runs on request. The cold question this answers is 'what good domains drop this week under $500': ?stage=pendingDelete&maxAsk=500&sort=ratio. While drops publication is disabled on this deploy the endpoint answers 500 expiring_unavailable instead of serving the list. Recorded in the key's usage log; spends no API calls.",
        "responses": {
          "200": {
            "description": "One page of lifecycle rows with the snapshot envelope.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/X-Request-Id" },
              "X-Credits-Limit": { "$ref": "#/components/headers/X-Credits-Limit" },
              "X-Credits-Remaining": { "$ref": "#/components/headers/X-Credits-Remaining" },
              "X-Credits-Reset": { "$ref": "#/components/headers/X-Credits-Reset" },
              "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" },
              "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ExpiringPage" }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "402": { "$ref": "#/components/responses/PaymentRequiredReadOnly" },
          "403": { "$ref": "#/components/responses/InsufficientScope" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ExpiringUnavailable" },
          "503": { "$ref": "#/components/responses/AuthUnavailable" }
        },
        "tags": ["expiring"]
      },
      "head": {
        "summary": "Same as GET without the body",
        "operationId": "headExpiring",
        "x-idempotency": { "safe": true, "retry": "HEAD runs the GET handler and discards the body; it spends nothing and is always safe to repeat." },
        "description": "HEAD runs the real GET handler and discards the body (RFC 9110). It spends no API call. Status codes and headers are those of GET.",
        "responses": {
          "200": {
            "description": "Headers only, per RFC 9110. The GET handler runs and its status and headers are returned with no body, so every status GET can answer is reachable here too.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/X-Request-Id" },
              "X-Credits-Limit": { "$ref": "#/components/headers/X-Credits-Limit" },
              "X-Credits-Remaining": { "$ref": "#/components/headers/X-Credits-Remaining" },
              "X-Credits-Reset": { "$ref": "#/components/headers/X-Credits-Reset" },
              "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" },
              "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "402": { "$ref": "#/components/responses/PaymentRequiredReadOnly" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ExpiringUnavailable" },
          "503": { "$ref": "#/components/responses/AuthUnavailable" }
        },
        "tags": ["expiring"]
      }
    },
    "/api/v1/expired": {
      "parameters": [
        { "name": "tld", "in": "query", "schema": { "type": "string" }, "description": "Only rows under this TLD." },
        { "name": "sort", "in": "query", "schema": { "type": "string", "enum": ["ratio", "signal", "droppingSoonest"], "default": "ratio" }, "description": "ratio sorts by mispricing ratio (the flagship order), signal by signal score, droppingSoonest by estimated drop date. The stage filter is pinned to droppedAvailable on this path and a stage parameter is not accepted." },
        { "name": "maxAsk", "in": "query", "schema": { "type": "number" }, "description": "Only rows with a recorded ask at or under this USD amount." },
        { "name": "maxRatio", "in": "query", "schema": { "type": "number" }, "description": "Only rows whose mispricing ratio is at or under this value." },
        { "name": "minConfidence", "in": "query", "schema": { "type": "number" }, "description": "Only rows whose appraisal confidence is at or above this value." },
        { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 100 } },
        { "name": "cursor", "in": "query", "schema": { "type": "string" }, "description": "Opaque pagination cursor from a previous response's nextCursor." }
      ],
      "get": {
        "summary": "Registration candidates with unconfirmed availability (spends nothing, read scope; paid plan required)",
        "operationId": "listExpired",
        "x-idempotency": { "safe": true, "retry": "Read-only and spends nothing; safe to repeat. Pagination is by the opaque cursor: pass nextCursor back as cursor for the following page." },
        "description": "The stage-fixed sibling of GET /api/v1/expiring: same envelope, same filters, same cursor pagination, with the stage pinned to the legacy droppedAvailable code. Registry not-found or drop-stage signals do not prove prior expiry or availability: every row reports availability unknown and candidateOnly true until an independent confirmation contract exists. Serves the committed expiring snapshot; while drops publication is disabled on this deploy the endpoint answers 500 expiring_unavailable instead of serving the list. Recorded in the key's usage log; spends no API calls.",
        "responses": {
          "200": {
            "description": "One page of lifecycle rows with the snapshot envelope.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/X-Request-Id" },
              "X-Credits-Limit": { "$ref": "#/components/headers/X-Credits-Limit" },
              "X-Credits-Remaining": { "$ref": "#/components/headers/X-Credits-Remaining" },
              "X-Credits-Reset": { "$ref": "#/components/headers/X-Credits-Reset" },
              "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" },
              "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ExpiringPage" }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "402": { "$ref": "#/components/responses/PaymentRequiredReadOnly" },
          "403": { "$ref": "#/components/responses/InsufficientScope" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ExpiringUnavailable" },
          "503": { "$ref": "#/components/responses/AuthUnavailable" }
        },
        "tags": ["expiring"]
      },
      "head": {
        "summary": "Same as GET without the body",
        "operationId": "headExpired",
        "x-idempotency": { "safe": true, "retry": "HEAD runs the GET handler and discards the body; it spends nothing and is always safe to repeat." },
        "description": "HEAD runs the real GET handler and discards the body (RFC 9110). It spends no API call. Status codes and headers are those of GET.",
        "responses": {
          "200": {
            "description": "Headers only, per RFC 9110. The GET handler runs and its status and headers are returned with no body, so every status GET can answer is reachable here too.",
            "headers": {
              "X-Request-Id": { "$ref": "#/components/headers/X-Request-Id" },
              "X-Credits-Limit": { "$ref": "#/components/headers/X-Credits-Limit" },
              "X-Credits-Remaining": { "$ref": "#/components/headers/X-Credits-Remaining" },
              "X-Credits-Reset": { "$ref": "#/components/headers/X-Credits-Reset" },
              "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" },
              "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "402": { "$ref": "#/components/responses/PaymentRequiredReadOnly" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ExpiringUnavailable" },
          "503": { "$ref": "#/components/responses/AuthUnavailable" }
        },
        "tags": ["expiring"]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer ad_live_..."
      },
      "headerKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      },
      "agentToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer <machine agent token> - the token the machine payment rails issue to an operator's agent; not an API key."
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "Correlation id for this request, on every response including successes. Quote it in support requests.",
        "schema": {
          "type": "string"
        }
      },
      "X-Credits-Limit": {
        "description": "Monthly API call allowance for this account's plan.",
        "schema": {
          "type": "integer"
        }
      },
      "X-Credits-Remaining": {
        "description": "API calls left in the current monthly allowance, after this call.",
        "schema": {
          "type": "integer"
        }
      },
      "X-Credits-Reset": {
        "description": "ISO 8601 instant the allowance refills: the first instant of the next UTC month.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "X-RateLimit-Limit": {
        "description": "Currently repeats X-Credits-Limit. Read X-Credits-Limit for the allowance.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Currently repeats X-Credits-Remaining. Read X-Credits-Remaining for the allowance.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "invalid_json (the body is not valid JSON) or invalid_domain (the domain is missing or not a registrable hostname). /api/v1/comps reads no body, so it can only answer invalid_domain.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "BadRequestBulk": {
        "description": "invalid_json (the body is not valid JSON), domains_required (the `domains` array is missing or empty), too_many_domains (more entries than one call takes - the body's `max` field gives the maximum), or invalid_domain (an entry is not a registrable hostname).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RequestBodyTooLarge": {
        "description": "body_too_large (the encoded JSON body exceeds the endpoint's maxBytes limit). The body is refused before database key verification, metering, or engine work.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "key_required (no key sent) or invalid_key (unknown, revoked, or expired). key_required also carries withoutKey (what works with no key) and plans (what a key costs).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "WWW-Authenticate": {
            "description": "Bearer realm=\"audit.domains\" on key_required; adds error=\"invalid_token\" on invalid_key (RFC 6750).",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "paid_plan_required (the account is on the free plan, which does not include API access), upgrade_required (the plan does not include the requested feature - only the bulk endpoint is gated this way), or a spent allowance.\n\nThe code for a spent monthly API allowance is `api_quota_exhausted`. A deployment not yet running the separate API credit pool answers the older `quota_exhausted` for the same condition, so a client should treat both as \"allowance spent\" and branch the same way. Either way the website's appraisal credits are a separate allowance and are unaffected by API calls.\n\nThe X-Credits-* headers are present on the two allowance codes, which are refused after the meter was read, and absent on paid_plan_required and upgrade_required, which are refused before it.",
        "headers": {
          "X-Credits-Limit": {
            "$ref": "#/components/headers/X-Credits-Limit"
          },
          "X-Credits-Remaining": {
            "$ref": "#/components/headers/X-Credits-Remaining"
          },
          "X-Credits-Reset": {
            "$ref": "#/components/headers/X-Credits-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PaymentRequiredReadOnly": {
        "description": "paid_plan_required - the account is on the free plan, which does not include API access. This endpoint spends no API calls, so it never answers an allowance code.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InsufficientScope": {
        "description": "insufficient_scope - the endpoint spends an API call and the key has read scope only. Create a write-scoped key at https://audit.domains/profile?tab=api. The body carries `scope` (the key's) and `requiredScope`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "method_not_allowed - this path does not serve that HTTP method. The `Allow` response header and the body's `allowed` array both list the methods it does serve.",
        "headers": {
          "Allow": {
            "description": "Comma-separated methods this path serves.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "rate_limited - either the per-address token bucket in front of key verification tripped, or the key is over its plan's per-minute limit (Plus 60, Pro 120, Max 300). See the request-limits note in the document description for the per-endpoint per-address figures. Both carry Retry-After; only the per-key limiter carries X-RateLimit-Reset and a `plan` field in the body, so that header is what tells you which limiter refused the call.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "Unix seconds at which the current 60-second window ends. Present when the per-key limiter tripped.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "AppraisalFailed": {
        "description": "appraisal_failed - the appraisal could not be completed. Retryable: retry with backoff, and quote the requestId if it persists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "CompsFailed": {
        "description": "comps_failed - the comparables could not be computed. Retryable: retry with backoff, and quote the requestId if it persists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "SalesUnavailable": {
        "description": "sales_unavailable - the recorded-sales index could not be read. Retryable: retry with backoff, and quote the requestId if it persists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ExpiringUnavailable": {
        "description": "expiring_unavailable - the expiring-domains list could not be read. Retryable: retry with backoff, and quote the requestId if it persists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "AuthUnavailable": {
        "description": "api_auth_unavailable - key verification is unreachable; the API fails closed rather than serving unmetered.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Stable machine-readable code; the only field a client should match on. The full catalogue is published at https://audit.domains/developers#errors"
          },
          "message": {
            "type": "string",
            "description": "Human-readable and safe to display; never contains internals."
          },
          "detail": {
            "type": "string",
            "description": "The actionable next step, when there is one."
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for this request, always present; also sent as the X-Request-Id header on every response. Quote it in support requests."
          },
          "docsUrl": {
            "type": "string",
            "format": "uri",
            "description": "Deep link to this code's entry in the published error catalogue."
          },
          "retryable": {
            "type": "boolean",
            "description": "Whether repeating the identical request can succeed."
          },
          "plan": {
            "type": "string",
            "description": "The account's plan id. Present on the per-key 429 rate_limited, on 403 insufficient_scope, and on the 402 codes."
          },
          "scope": {
            "type": "string",
            "description": "The scope the key was created with. Present on 403 insufficient_scope."
          },
          "requiredScope": {
            "type": "string",
            "description": "The scope this endpoint needs. Present on 403 insufficient_scope."
          },
          "max": {
            "type": "integer",
            "description": "Maximum domains one bulk call accepts. Present on 400 too_many_domains."
          },
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Methods this path serves, matching the Allow header. Present on 405 method_not_allowed."
          },
          "source": {
            "type": "string",
            "description": "The sales source that is not published. Present on 503 source_unavailable."
          },
          "withoutKey": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FreeRoute"
            },
            "description": "What works with no key. Present on 401 key_required."
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanOffer"
            },
            "description": "The plans whose keys can call this API, cheapest first. Present on 401 key_required and 402 paid_plan_required."
          },
          "planTerms": {
            "type": "string",
            "description": "Whether a paid term renews. Present on 401 key_required."
          },
          "pricing": {
            "type": "string",
            "format": "uri",
            "description": "The keyless API index, which carries the same plans. Present on 401 key_required."
          }
        },
        "required": ["error", "message", "requestId", "docsUrl", "retryable"]
      },
      "Factor": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "Comp": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "priceUsd": {
            "type": "number"
          },
          "year": {
            "type": "string"
          },
          "venue": {
            "type": ["string", "null"]
          },
          "similarity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "basis": {
            "type": ["string", "null"],
            "description": "Why this sale was matched, naming the channel the matcher scored on (shared keyword, word family, same industry, structural cohort, spelling, length/zone). null means the basis was not recorded for this comp - the match is unexplained, not explained by something unstated."
          }
        }
      },
      "Appraisal": {
        "type": "object",
        "description": "The locked v1 projection. Keys are contract-locked; new keys only arrive with a version bump.",
        "properties": {
          "domain": {
            "type": "string"
          },
          "valueUSD": {
            "type": "number"
          },
          "valueRange": {
            "type": "object",
            "properties": {
              "low": {
                "type": "number"
              },
              "mid": {
                "type": "number"
              },
              "high": {
                "type": "number"
              }
            }
          },
          "tier": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "factors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Factor"
            }
          },
          "methodologyVersion": {
            "type": ["string", "null"]
          },
          "engineVersion": {
            "type": "string"
          },
          "comps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Comp"
            },
            "maxItems": 5
          },
          "appraisalHash": {
            "type": "string",
            "description": "SHA-256 over {commitment, result, hashVersion} - the appraisal's stable id (ODVS)."
          },
          "inputCommitment": {
            "type": "string",
            "description": "SHA-256 over {domain, engineId, engineVersion} - identity of the computation (ODVS)."
          },
          "resultDigest": {
            "type": "string",
            "description": "SHA-256 over the canonical numeric outputs (ODVS)."
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dataEdition": {
            "type": ["string", "null"],
            "description": "Version of the comparables snapshot in effect, when known."
          }
        }
      },
      "SaleRecord": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "saleDate": {
            "type": "string",
            "description": "ISO date, a bare year, or empty when unknown."
          },
          "venue": {
            "type": ["string", "null"]
          },
          "category": {
            "type": ["string", "null"]
          },
          "verified": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "description": "Corpus provenance. The paid sales API currently serves \"curated\"."
          }
        }
      },
      "PlanOffer": {
        "type": "object",
        "description": "One paid plan whose key can call /api/v1, derived from the billing configuration (the same figures as https://audit.domains/pricing).",
        "properties": {
          "id": {
            "type": "string",
            "description": "Plan id, as /checkout?plan= names it."
          },
          "name": {
            "type": "string"
          },
          "usdPerTerm": {
            "type": "number",
            "description": "Price of one term in USD."
          },
          "term": {
            "type": "string",
            "enum": ["month"]
          },
          "monthlyCalls": {
            "type": "integer",
            "description": "/api/v1 calls included per term; a separate allowance from site appraisals."
          },
          "usdPerCall": {
            "type": "number",
            "description": "Effective USD per included call, rounded to 4 places."
          },
          "burstPerMinute": {
            "type": "integer",
            "description": "Per-key request limit per minute."
          },
          "checkout": {
            "type": "string",
            "format": "uri",
            "description": "Where a person signs in and pays. An agent cannot complete it."
          }
        },
        "required": [
          "id",
          "name",
          "usdPerTerm",
          "term",
          "monthlyCalls",
          "usdPerCall",
          "burstPerMinute",
          "checkout"
        ]
      },
      "FreeRoute": {
        "type": "object",
        "description": "A route that works with no key. {name} stands for the domain.",
        "properties": {
          "what": {
            "type": "string"
          },
          "how": {
            "type": "string"
          }
        },
        "required": ["what", "how"]
      }
,
      "ExpiryRow": {
        "type": "object",
        "description": "One lifecycle row from the committed expiring snapshot. Every nullable field is paired with a reason field that is null exactly when the value is present, so a null never has to be guessed at. Registration availability is never asserted: availability is always \"unknown\" in v1 and candidateOnly is true for droppedAvailable rows.",
        "properties": {
          "domain": { "type": "string" },
          "stage": {
            "type": "string",
            "enum": ["grace", "redemption", "pendingDelete", "droppingToday", "droppedAvailable", "auction", "closeout", "zoneExit"]
          },
          "candidateOnly": { "type": "boolean" },
          "availability": { "type": "string", "enum": ["unknown"] },
          "availabilityConfirmedAt": { "type": ["string", "null"] },
          "availabilityReason": { "type": "string" },
          "rdapStatuses": { "type": "array", "items": { "type": "string" } },
          "rdapPolledAt": { "type": ["string", "null"] },
          "rdapPolledAtReason": { "type": ["string", "null"] },
          "expiryDate": { "type": ["string", "null"] },
          "expiryDateReason": { "type": ["string", "null"] },
          "estimatedDropAt": { "type": ["string", "null"] },
          "estimatedDropAtReason": { "type": ["string", "null"] },
          "registrar": { "type": ["string", "null"] },
          "registrarReason": { "type": ["string", "null"] },
          "estimateUSD": { "type": "number" },
          "rangeLowUSD": { "type": "number" },
          "rangeHighUSD": { "type": "number" },
          "confidence": { "type": "number" },
          "signalScore": { "type": "number" },
          "askUSD": { "type": ["number", "null"] },
          "askReason": { "type": ["string", "null"] },
          "askKind": { "type": ["string", "null"], "enum": ["auctionBid", "buyNow", "closeout", "regPrice", "forSaleAsk", null] },
          "askKindReason": { "type": ["string", "null"] },
          "askSource": { "type": ["string", "null"] },
          "askSourceReason": { "type": ["string", "null"] },
          "askAt": { "type": ["string", "null"] },
          "askAtReason": { "type": ["string", "null"] },
          "auctionLowUSD": { "type": ["number", "null"] },
          "auctionTypicalUSD": { "type": ["number", "null"] },
          "auctionHighUSD": { "type": ["number", "null"] },
          "auctionBandReason": { "type": ["string", "null"] },
          "mispricingRatio": { "type": ["number", "null"] },
          "mispricingRatioReason": { "type": ["string", "null"] },
          "mispricingBand": { "type": "string", "enum": ["belowRange", "insideRange", "aboveRange", "unknown"] },
          "riskScore": { "type": ["number", "null"] },
          "riskScoreReason": { "type": ["string", "null"] },
          "riskFlags": { "type": "array", "items": { "type": "string", "enum": ["spamHistory", "trademarkWatch", "priorRedirectAbuse", "parkedHistory", "blocklistHit"] } },
          "patternTags": { "type": "array", "items": { "type": "string", "enum": ["oneWord", "twoWord", "cvcv", "numeric", "geo", "dictionary"] } },
          "source": { "type": "string" },
          "capturedAt": { "type": "string" },
          "appraisalRev": { "type": "string" },
          "appraisedAt": { "type": "string" }
        },
        "required": ["domain", "stage", "availability", "estimateUSD", "rangeLowUSD", "rangeHighUSD", "confidence", "signalScore", "mispricingBand", "source", "capturedAt", "appraisalRev", "appraisedAt"]
      },
      "ExpiringPage": {
        "type": "object",
        "description": "One page of lifecycle rows plus the envelope: dataAsOf and methodologyRev ride on every response, and provenance.signed is false because appraisal fields are embedded unsigned until the Signed Valuation Object ships.",
        "properties": {
          "dataAsOf": { "type": "string" },
          "methodologyRev": { "type": "string" },
          "provenance": {
            "type": "object",
            "properties": {
              "isSample": { "type": "boolean" },
              "feedLabel": { "type": "string" },
              "signed": { "type": "boolean", "enum": [false] },
              "note": { "type": "string" }
            },
            "required": ["isSample", "feedLabel", "signed", "note"]
          },
          "count": { "type": "integer", "description": "Total rows matching the filters, before pagination." },
          "nextCursor": { "type": ["string", "null"], "description": "Opaque cursor for the next page, or null on the last page." },
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/ExpiryRow" } }
        },
        "required": ["dataAsOf", "methodologyRev", "provenance", "count", "nextCursor", "items"]
      }
    }
  },
  "tags": [
    {
      "name": "appraisals",
      "description": "Deterministic valuations and comparable sales for one domain"
    },
    {
      "name": "bulk",
      "description": "Multi-domain appraisal with reserve-then-settle metering"
    },
    {
      "name": "sales",
      "description": "Recorded domain sales search"
    },
    {
      "name": "account",
      "description": "Key usage and allowance"
    },
    {
      "name": "expiring",
      "description": "Expiring and dropped-registration candidate lists"
    }
  ]
}
