{"openapi":"3.1.0","info":{"title":"x402 Domain Health API","version":"2.0.0","description":"Pay-per-call domain health check for AI agents: authoritative RDAP registration/expiry plus live HTTPS/TLS reachability, in one sub-second call.","x-guidance":"Use GET /domain-health/:domain for a 0-100 health score with per-component breakdown. You are charged ONLY for a complete combined verdict — both the RDAP registration half and the live TLS half must return data, or the call fails with 4xx/5xx and costs you nothing (the sole exception being an unregistered domain, which is itself a complete answer). Every error body carries a stable `error` code, `charged:false`, and `retryable` so you can decide whether to back off and retry or stop asking. Read the `limitations` array: the TLS component measures HTTPS handshake success, not served-certificate expiry.","x-payment-policy":"NEVER CHARGED FOR AN UNDELIVERABLE ANSWER. The x402 middleware cancels settlement for any response >= 400, so every error documented below moves $0.00 and emits no payment-response header. Partial results are refused rather than billed.","x-limitations":["TLS scoring measures HTTPS handshake success at check time, not served-certificate expiry.","certificateTransparency is informational and excluded from the score.","TLDs with no RDAP service (e.g. .co, .me, .ch) CANNOT be served at all and return 400 unsupported_tld without charge — we refuse rather than bill for a TLS-only half-answer.","Some registries (e.g. .de) publish no expiry date by policy; that is still a complete, billable answer since registration status and registry flags are returned."]},"paths":{"/domain-health/{domain}":{"get":{"operationId":"domainHealth","summary":"Combined domain health verdict","tags":["Security"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"},"description":"Domain name, e.g. wikipedia.org"}],"responses":{"200":{"description":"Complete combined domain health verdict (both components returned data), OR a definitive 'domain is not registered' answer. This is the only response you are charged for."},"400":{"description":"NOT CHARGED. Either `malformed_domain` (input is not a domain name) or `unsupported_tld` (the TLD publishes no RDAP service, e.g. .co/.me/.ch, so the registration half can never be produced — `retryable:false`, do not retry).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["malformed_domain","unsupported_tld"]},"message":{"type":"string"},"charged":{"type":"boolean","enum":[false]},"retryable":{"type":"boolean"}}}}}},"402":{"description":"Payment Required"},"405":{"description":"NOT CHARGED. Wrong HTTP verb for this resource; see the Allow header."},"502":{"description":"NOT CHARGED. An upstream needed for the combined verdict failed — `upstream_data_unavailable` (both dead), `registration_upstream_unavailable` (RDAP failed), or `tls_upstream_unavailable` (HTTPS probe failed). All are `retryable:true`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upstream_data_unavailable","registration_upstream_unavailable","tls_upstream_unavailable"]},"message":{"type":"string"},"charged":{"type":"boolean","enum":[false]},"retryable":{"type":"boolean","enum":[true]},"components":{"type":"array"},"reasons":{"type":"array"}}}}}}}}}}}