{"openapi":"3.1.0","info":{"title":"ATTESTRAS API","summary":"Deterministic attestation infrastructure","description":"Create deterministic provenance receipts and verify bounded receipt integrity. Verification proves receipt integrity and recorded provenance, not truth.","version":"1.0.0rc4"},"paths":{"/v1/proofs":{"post":{"tags":["Proofs"],"summary":"Create an immutable provenance receipt","description":"Authenticated HMAC ingest. A safe retry of the same request returns the original receipt; changed content under the same idempotency key returns 409.","operationId":"ingest_v1_proofs_post","responses":{"200":{"description":"Safe replay returned original receipt","content":{"application/json":{"schema":{}}}},"201":{"description":"Proof created"},"409":{"description":"Idempotency key reused with different content"}},"parameters":[{"name":"X-Signature-Version","in":"header","required":true,"schema":{"type":"string","example":"pg-hmac-sha256-v1"}},{"name":"X-Timestamp","in":"header","required":true,"schema":{"type":"string","example":"1789999999"}},{"name":"X-Request-ID","in":"header","required":true,"schema":{"type":"string","example":"run-018f2"}},{"name":"X-Source-System","in":"header","required":true,"schema":{"type":"string","example":"agent-prod"}},{"name":"X-Key-ID","in":"header","required":true,"schema":{"type":"string","example":"key-2026-09"}},{"name":"X-Signature","in":"header","required":true,"schema":{"type":"string","minLength":64,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["artifact","actor","claim"],"properties":{"artifact":{"type":"object","required":["uri","file_hash"],"properties":{"uri":{"type":"string","example":"https://trusted-storage.com/runs/42.json"},"file_hash":{"type":"string","minLength":64,"maxLength":64}}},"actor":{"type":"object","required":["external_ref"],"properties":{"external_ref":{"type":"string","example":"agent-run-42"}}},"claim":{"type":"object","required":["schema","assertion"],"properties":{"schema":{"type":"string","example":"pg.claim.v1"},"assertion":{"type":"string","example":"model emitted artifact"}}}}}}}}}},"/v1/records":{"post":{"tags":["Receipts"],"summary":"Export one of your own records","description":"Signed exactly like POST /v1/proofs, with body {\"proof_id\": \"pg_...\"}. Returns the stored record so you can recompute the receipt hash yourself. Only the owning tenant gets it; everything else is 404. Free: it never counts against an allowance.","operationId":"export_record_v1_records_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/verify":{"post":{"tags":["Verification"],"summary":"Verify a receipt","description":"Verify a proof ID and exact receipt hash without placing bearer receipt material in a URL query string.","operationId":"verify_api_v1_verify_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"proof_id":{"type":"string","pattern":"^pg_[0-9a-f]{32}$"},"proof_hash":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},"additionalProperties":false,"type":"object","required":["proof_id","proof_hash"]}}},"required":true},"responses":{"200":{"description":"Receipt verified","content":{"application/json":{"schema":{}}}},"404":{"description":"Receipt not verified"},"503":{"description":"Verification service unavailable"}}}},"/v1/verify/{proof_id}":{"get":{"tags":["Verification"],"summary":"Verify a receipt (legacy GET)","description":"Compatibility endpoint. New integrations should POST to /v1/verify so bearer receipt material is not placed in URL logs.","operationId":"verify_api_legacy_v1_verify__proof_id__get","deprecated":true,"parameters":[{"name":"proof_id","in":"path","required":true,"schema":{"type":"string","title":"Proof Id"}},{"name":"proof_hash","in":"query","required":false,"schema":{"type":"string","default":"","title":"Proof Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"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"}}}}