{"openapi":"3.1.0","info":{"title":"CertBeforePay","description":"Agent scan certificates (signed, not a legal CA or PKI) — OWASP-mapped scans, peer validation, short-lived certificates.","version":"1.0.0","x-guidance":"CertBeforePay sells pay-per-check agent trust APIs over x402 (USDC on Base). Certificates are short-lived signed scan records, not a legal CA or PKI, and not proof an agent is safe. The wallet check is a ScamSniffer scam/phishing signal, not an OFAC or sanctions screen.","contact":{"email":"support@certbeforepay.com"}},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/.well-known/x402":{"get":{"summary":"Well Known X402","operationId":"well_known_x402__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"resources":{"type":"array","items":{"type":"object"}},"facilitator":{"type":["string","null"]},"payTo":{"type":"string"},"publicBase":{"type":["string","null"]},"extensions":{"type":"array","items":{"type":"string"}},"maxTimeoutSeconds":{"type":"integer"}}}}}}},"security":[]}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/.well-known/security.txt":{"get":{"summary":"Security Txt","operationId":"security_txt__well_known_security_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/public-contact":{"get":{"summary":"Public Contact Endpoint","operationId":"public_contact_endpoint_v1_public_contact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/ca":{"get":{"summary":"Ca Root","operationId":"ca_root_v1_ca_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string"},"alg":{"type":"string"},"kid":{"type":"string"},"public_key_b64u":{"type":"string"},"spki_note":{"type":"string"},"keys":{"type":"array","items":{"type":"object"}},"revocations":{"type":"string"},"policy":{"type":"object"}}}}}}},"security":[]}},"/v1/catalog":{"get":{"summary":"Catalog","operationId":"catalog_v1_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"taxonomy":{"type":"object"},"taxonomy_version":{"type":"string"},"frameworks":{"type":"object"},"attribution":{"type":"object"},"prices":{"type":"array","items":{"type":"object"}},"certificate":{"type":"object"},"discovery":{"type":"object"}}}}}}},"security":[]}},"/v1/self-check":{"post":{"summary":"Self Check","operationId":"self_check_v1_self_check_post","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"scan_id":{"type":"string"},"subject":{"type":"string"},"tier":{"type":"string"},"result":{"type":"object","properties":{"verdict":{"type":"string"},"score":{"type":"integer"}}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.050000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"system_prompt":{"type":"string"},"tools":{"type":"array"},"skills":{"type":"array"},"mcp":{"type":"array"},"policy":{"type":"object"},"issue_certificate":{"type":"boolean"},"skill":{"type":["object","string"]},"wallet_proof":{"type":"object"}}}}}}}},"/v1/gate":{"post":{"summary":"Gate","operationId":"gate_v1_gate_post","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"scan_id":{"type":"string"},"subject":{"type":"string"},"result":{"type":"object","properties":{"verdict":{"type":"string"},"score":{"type":"integer"}}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.015000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":["object","string"]},"skills":{"type":"array"},"mcp":{"type":["object","array"]},"content":{"type":"string"},"system_prompt":{"type":"string"},"tools":{"type":"array"},"policy":{"type":"object"},"subject":{"type":"string"}}}}}}}},"/v1/cert/issue":{"post":{"summary":"Cert Issue","operationId":"cert_issue_v1_cert_issue_post","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"certificate":{"type":"object","properties":{"payload":{"type":"object","properties":{"typ":{"type":"string"},"sub":{"type":"string"},"tier":{"type":"string"},"iss":{"type":"string"}}},"alg":{"type":"string"},"issuer":{"type":"string"}}},"subject":{"type":"string"},"tier":{"type":"string"},"anchor":{"type":"object"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.025000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"self_check_id":{"type":"string"},"wallet_proof":{"type":"object"}},"required":["subject","self_check_id"]}}}}}},"/v1/cert/verify":{"post":{"summary":"Cert Verify","operationId":"cert_verify_v1_cert_verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"reason":{"type":"string"},"serial":{"type":"string"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"certificate":{"type":["object","string"]}}}}}},"security":[]}},"/v1/cert/revoke":{"post":{"summary":"Cert Revoke","operationId":"cert_revoke_v1_cert_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/cert/revocations":{"get":{"summary":"Cert Revocations","operationId":"cert_revocations_v1_cert_revocations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/peer/challenge":{"post":{"summary":"Peer Challenge","operationId":"peer_challenge_v1_peer_challenge_post","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string"},"valid":{"type":"boolean"},"peer":{"type":"object","properties":{}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"certificate":{"type":["object","string"]},"min_score":{"type":"integer"},"require_tier":{"type":"string"}},"required":["certificate"]}}}}}},"/v1/peer/attest":{"post":{"summary":"Peer Attest","operationId":"peer_attest_v1_peer_attest_post","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"attestation":{"type":"object","properties":{"payload":{"type":"object","properties":{"typ":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"note":{"type":"string"}}},"alg":{"type":"string"},"issuer":{"type":"string"}}},"to_endorsements":{"type":"integer"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from_certificate":{"type":["object","string"]},"wallet_proof":{"type":"object","properties":{"nonce":{"type":"string"},"signature":{"type":"string"}},"required":["nonce","signature"]},"to":{"type":"string"},"from":{"type":"string"},"note":{"type":"string"}},"required":["from_certificate","to","wallet_proof"]}}}}}},"/v1/feed":{"get":{"summary":"Feed","operationId":"feed_v1_feed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Limit"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"items":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300}},"post":{"summary":"Feed Add","operationId":"feed_add_v1_feed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/feed.atom":{"get":{"summary":"Feed Atom","description":"Free Atom view of the latest 3 items (same as the free JSON tier). Built with ElementTree,\nso every title/summary/link is XML-escaped; no item field is ever emitted as markup.","operationId":"feed_atom_v1_feed_atom_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/identity/challenge":{"post":{"summary":"Identity Challenge","operationId":"identity_challenge_v1_identity_challenge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/identity/bind":{"post":{"summary":"Identity Bind","operationId":"identity_bind_v1_identity_bind_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/identity/{address}":{"get":{"summary":"Identity Get","operationId":"identity_get_v1_identity__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/chain/anchor":{"post":{"summary":"Chain Anchor","operationId":"chain_anchor_v1_chain_anchor_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/chain/reconcile":{"post":{"summary":"Chain Reconcile","description":"Operator-only: resolve stale broadcast intents against the chain (PR B (f)). Counts only.","operationId":"chain_reconcile_v1_chain_reconcile_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/chain/status":{"get":{"summary":"Chain Status","operationId":"chain_status_v1_chain_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/chain/{cert_hash}":{"get":{"summary":"Chain One","operationId":"chain_one_v1_chain__cert_hash__get","parameters":[{"name":"cert_hash","in":"path","required":true,"schema":{"type":"string","title":"Cert Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/mcp":{"post":{"summary":"Mcp","description":"Minimal JSON-RPC surface: DISCOVERY ONLY.\n\ntools/list describes the paid HTTP endpoints; it does not offer callable execution.\ntools/call returns a documented error pointing at the x402 HTTP endpoint instead\n(executing paid tools over MCP would need an x402 payment flow inside JSON-RPC).","operationId":"mcp_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/wallet/check":{"post":{"summary":"Wallet Check Endpoint","description":"Validate a destination wallet before paying (risk signal, not a guarantee).","operationId":"wallet_check_endpoint_v1_wallet_check_post","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"address":{"type":"string"},"chain":{"type":"string"},"resource":{"type":"string"},"verdict":{"type":"string"},"list_result":{"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}},"disclaimer":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008000"},"protocols":[{"x402":{}}],"maxTimeoutSeconds":300},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Destination 0x wallet"},"chain":{"type":"string","description":"CAIP-2 chain id; default eip155:8453 (Base)"},"resource":{"type":"string","description":"Optional resource URL or domain context"},"domain":{"type":"string","description":"Optional domain alias for resource"}},"required":["address"]}}}}}},"/v1/directory":{"get":{"summary":"Directory","operationId":"directory_v1_directory_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/agent/{subject}":{"get":{"summary":"Agent","operationId":"agent_v1_agent__subject__get","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/openapi.json":{"get":{"summary":"Openapi Override","operationId":"openapi_override_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/docs-site":{"get":{"summary":"Docs Site","operationId":"docs_site_docs_site_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"servers":[{"url":"https://certbeforepay.com"}]}