{"openapi":"3.1.0","info":{"title":"KeyGarden API","version":"1.0.0","description":"Evidence Integrity / tamper-evident proof. SHA-256 proves exact stored bytes match a digest; it never certifies truth. Device time and GPS are self-reported."},"servers":[{"url":"https://keygarden.io"}],"components":{"securitySchemes":{"buyerKey":{"type":"http","scheme":"bearer","description":"Payment-confirmed buyer key from the KeyGarden dashboard."}}},"paths":{"/stamper/stamp":{"post":{"summary":"Alias for buyer-key action stamp; no photo authenticity guarantee","security":[{"buyerKey":[]}],"responses":{"200":{"description":"Stored integrity record"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/stamper/verify":{"post":{"summary":"Public proof metadata; content and GPS stay private","responses":{"200":{"description":"Proof found status and integrity"}}}},"/qr/generate":{"post":{"summary":"Buyer-key QR creation with verified mother execution","security":[{"buyerKey":[]}],"responses":{"200":{"description":"Proof QR"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/sos/create":{"post":{"summary":"Unavailable: no rescue dispatch connected","responses":{"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/sos/status":{"post":{"summary":"Unavailable: no rescue tracking connected","responses":{"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/map/offline":{"post":{"summary":"Unavailable: no offline map coverage connected","responses":{"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/pdf/tribunal":{"post":{"summary":"Owner-scoped evidence PDF with exact attached canonical bytes; not certified legal evidence","security":[{"buyerKey":[]}],"responses":{"200":{"description":"Evidence PDF"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/mcp":{"post":{"summary":"Public MCP server (no login): hash_text, check_integrity. Free, stateless, nothing stored.","responses":{"200":{"description":"MCP JSON-RPC response"}}}},"/api/public/agent/stamp":{"post":{"summary":"Create a stamp (uses free stamp, plan allowance or single-stamp credits)","security":[{"buyerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","maxLength":5000},"claimed_at":{"type":"string","format":"date-time"},"idempotency_key":{"type":"string"},"gps":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"accuracy_m":{"type":"number"},"captured_at":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Stamp with sha256, review VERTE/ROUGE/UNVERIFIED, proof_url"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/agent/qr":{"post":{"summary":"QR proof for one of your stamps (QR plan required)","security":[{"buyerKey":[]}],"responses":{"200":{"description":"QR SVG + proof_url"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/agent/checkout":{"post":{"summary":"Crypto checkout for a plan or single stamps (only when crypto is available)","security":[{"buyerKey":[]}],"responses":{"200":{"description":"Hosted payment URL"},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/waos/status":{"get":{"summary":"Public catalog handshake status (no evidence executed)","responses":{"200":{"description":"Status flags"}}}},"/api/public/agent/evidence":{"post":{"summary":"Read your exact stored evidence as JSON, QR or PDF; existing record access only, no new entitlement","security":[{"buyerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["proof_id"],"additionalProperties":false,"properties":{"proof_id":{"type":"string","format":"uuid"},"format":{"type":"string","enum":["json","qr","pdf"],"default":"json"}}}}}},"responses":{"200":{"description":"Owner/environment-scoped evidence readback"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/evidence/{id}/did.json":{"get":{"summary":"Public record DID reference; no canonical bytes, GPS or owner identity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"DID document with byte-integrity scope; no signature or hardware certification"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/proof/{id}":{"get":{"summary":"Human-readable proof page: integrity, checks, REVOKED state. Content stays private.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"HTML"}}}}}}