{"openapi":"3.1.0","info":{"title":"Attest402","summary":"Cryptographically signed and timestamped evidence of a public web or API response.","description":"**Attest402** captures a public website or API response and returns a portable,\ncryptographically signed and timestamped evidence package that can be verified offline.\n\n- `POST /v1/attest` — paid via [x402](https://x402.org) (0.20 USDC on Base): fetches a public\n  HTTPS URL, hashes body + headers + redirects, signs the record with Ed25519 and anchors it\n  with an RFC-3161 trusted timestamp.\n- Verification is always free, and evidence packages verify fully offline.\n\nThe evidence confirms the integrity of the captured data and Attest402's observation.\nIt does not certify the truth, legality or authorship of the captured content.\n","contact":{"name":"Attest402","url":"https://attest402.com/"},"version":"1.0.0"},"paths":{"/v1/attest":{"post":{"tags":["attestation"],"summary":"Create a signed evidence package for a public HTTPS URL (x402: 0.20 USDC)","operationId":"attest_v1_attest_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify":{"post":{"tags":["verification"],"summary":"Verify an attestation (free)","operationId":"verify_v1_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify/{attestation_id}":{"get":{"tags":["verification"],"summary":"Attestation metadata (free)","operationId":"verify_by_id_v1_verify__attestation_id__get","parameters":[{"name":"attestation_id","in":"path","required":true,"schema":{"type":"string","title":"Attestation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evidence/{attestation_id}":{"get":{"tags":["verification"],"summary":"Download evidence package (free, 24 h retention)","operationId":"evidence_v1_evidence__attestation_id__get","parameters":[{"name":"attestation_id","in":"path","required":true,"schema":{"type":"string","title":"Attestation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/attest-keys.json":{"get":{"tags":["keys"],"summary":"Ed25519 public keys","operationId":"keys__well_known_attest_keys_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["discovery"],"summary":"Agent description","operationId":"llms_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"tags":["ops"],"summary":"Healthcheck","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AttestRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"externalReference":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Externalreference"},"includeTrustedTimestamp":{"type":"boolean","title":"Includetrustedtimestamp","default":true}},"additionalProperties":false,"type":"object","required":["url"],"title":"AttestRequest"},"AttestResponse":{"properties":{"attestationId":{"type":"string","title":"Attestationid"},"observedAt":{"type":"string","title":"Observedat"},"requestedUrl":{"type":"string","title":"Requestedurl"},"finalUrl":{"type":"string","title":"Finalurl"},"httpStatus":{"type":"integer","title":"Httpstatus"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenttype"},"contentLength":{"type":"integer","title":"Contentlength"},"bodyHash":{"type":"string","title":"Bodyhash"},"headersHash":{"type":"string","title":"Headershash"},"redirectChain":{"items":{"$ref":"#/components/schemas/RedirectHopModel"},"type":"array","title":"Redirectchain"},"externalReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalreference"},"attestation":{"$ref":"#/components/schemas/AttestationBlock"},"trustedTimestamp":{"$ref":"#/components/schemas/TrustedTimestampBlock"},"publicKeyUrl":{"type":"string","title":"Publickeyurl"},"verificationUrl":{"type":"string","title":"Verificationurl"},"evidencePackageUrl":{"type":"string","title":"Evidencepackageurl"}},"type":"object","required":["attestationId","observedAt","requestedUrl","finalUrl","httpStatus","contentType","contentLength","bodyHash","headersHash","redirectChain","attestation","trustedTimestamp","publicKeyUrl","verificationUrl","evidencePackageUrl"],"title":"AttestResponse"},"AttestationBlock":{"properties":{"schemaVersion":{"type":"string","title":"Schemaversion","default":"1.0"},"algorithm":{"type":"string","title":"Algorithm","default":"Ed25519"},"keyId":{"type":"string","title":"Keyid"},"signature":{"type":"string","title":"Signature"},"canonicalRecordHash":{"type":"string","title":"Canonicalrecordhash"}},"type":"object","required":["keyId","signature","canonicalRecordHash"],"title":"AttestationBlock"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RedirectHopModel":{"properties":{"url":{"type":"string","title":"Url"},"status":{"type":"integer","title":"Status"},"location":{"type":"string","title":"Location"}},"type":"object","required":["url","status","location"],"title":"RedirectHopModel"},"TrustedTimestampBlock":{"properties":{"type":{"type":"string","title":"Type","default":"RFC3161"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"tokenHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tokenhash"},"genTime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gentime"},"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"TrustedTimestampBlock"},"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"},"VerifyRequest":{"properties":{"attestation":{"additionalProperties":true,"type":"object","title":"Attestation","description":"The attestation.json contents (canonical record + signature block)."},"bodyBase64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bodybase64","description":"Optional: base64 of the original response body to check bodyHash."}},"additionalProperties":false,"type":"object","required":["attestation"],"title":"VerifyRequest"},"VerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"signatureValid":{"type":"boolean","title":"Signaturevalid"},"bodyHashValid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bodyhashvalid"},"trustedTimestampValid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trustedtimestampvalid"},"keyStatus":{"type":"string","title":"Keystatus"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"verifiedAt":{"type":"string","title":"Verifiedat"}},"type":"object","required":["valid","signatureValid","keyStatus","verifiedAt"],"title":"VerifyResponse"}}}}