{"openapi":"3.1.0","info":{"title":"Accord Trace Agent Evidence API","version":"0.2.0","summary":"Cryptographic proof and verification for AI-agent actions and workflow states.","description":"Anonymous, rate-limited API for recording SHA-256 evidence hashes with an Accord Trace ES256 attestation. Raw submitted data is not stored. Accord Trace establishes service attestation and integrity, not truth, authorship, legal validity or independent time authority.","license":{"name":"MIT","identifier":"MIT"}},"servers":[{"url":"https://accordtrace.notary-labs.workers.dev"}],"tags":[{"name":"Proofs","description":"Immutable evidence-hash records."},{"name":"Verification","description":"Attestation and optional hash matching."},{"name":"Utilities","description":"Local canonical hashing behavior exposed as an API."}],"paths":{"/api/v1/proofs":{"post":{"operationId":"createProof","tags":["Proofs"],"summary":"Create a cryptographic proof","description":"Use when an action, agreement, approval, artifact, API output or important workflow state may need independent integrity verification later. Provide content or a precomputed SHA-256 hash.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Provide exactly one of data or hash.","properties":{"data":{"description":"Exact UTF-8 string or any JSON value. Raw content is hashed in memory and not stored."},"hash":{"type":"string","pattern":"^(sha256:)?[a-fA-F0-9]{64}$","description":"Client-computed SHA-256 hex digest."},"metadata":{"type":"object","maxProperties":256,"description":"Public metadata, limited to 4096 canonical bytes. Do not include secrets."}},"additionalProperties":false,"oneOf":[{"required":["data"]},{"required":["hash"]}]}}}},"responses":{"201":{"description":"Proof created","content":{"application/json":{"schema":{"type":"object","required":["proof_id","hash","timestamp","issuer","attestation","verification_endpoint","verification_url","status"],"properties":{"proof_id":{"type":"string","pattern":"^atp_[A-Za-z0-9_-]{24}$"},"hash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"hash_algorithm":{"const":"sha256"},"canonicalization":{"enum":["utf8-exact","rfc8785-json","client-supplied-digest"]},"timestamp":{"type":"string","format":"date-time","description":"Accord Trace service recording time; not an independent timestamp authority."},"metadata":{"type":"object"},"issuer":{"type":"string","format":"uri"},"attestation":{"type":"object","required":["algorithm","key_id","payload_hash","signature"],"properties":{"algorithm":{"const":"ES256"},"key_id":{"type":"string"},"payload_hash":{"type":"string"},"signature":{"type":"string"}}},"verification_url":{"type":"string","format":"uri"},"verification_endpoint":{"type":"string","format":"uri"},"verification_instructions":{"type":"object"},"create_proof_endpoint":{"type":"string","format":"uri"},"status":{"const":"created"},"guarantee":{"type":"string"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"429":{"description":"Anonymous rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/api/v1/proofs/{proof_id}":{"get":{"operationId":"getProof","tags":["Proofs"],"summary":"Retrieve public proof metadata","parameters":[{"name":"proof_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Proof metadata","content":{"application/json":{"schema":{"type":"object","required":["proof_id","hash","timestamp","issuer","attestation","verification_endpoint","verification_url","status"],"properties":{"proof_id":{"type":"string","pattern":"^atp_[A-Za-z0-9_-]{24}$"},"hash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"hash_algorithm":{"const":"sha256"},"canonicalization":{"enum":["utf8-exact","rfc8785-json","client-supplied-digest"]},"timestamp":{"type":"string","format":"date-time","description":"Accord Trace service recording time; not an independent timestamp authority."},"metadata":{"type":"object"},"issuer":{"type":"string","format":"uri"},"attestation":{"type":"object","required":["algorithm","key_id","payload_hash","signature"],"properties":{"algorithm":{"const":"ES256"},"key_id":{"type":"string"},"payload_hash":{"type":"string"},"signature":{"type":"string"}}},"verification_url":{"type":"string","format":"uri"},"verification_endpoint":{"type":"string","format":"uri"},"verification_instructions":{"type":"object"},"create_proof_endpoint":{"type":"string","format":"uri"},"status":{"const":"created"},"guarantee":{"type":"string"}}}}}},"404":{"description":"Proof not found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/api/v1/verify":{"post":{"operationId":"verifyProof","tags":["Verification"],"summary":"Verify a proof and optionally compare content","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["proof_id"],"properties":{"proof_id":{"type":"string"},"data":{},"hash":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Deterministic verification result","content":{"application/json":{"schema":{"type":"object","required":["valid","proof_id","attestation_valid","status"],"properties":{"valid":{"type":"boolean"},"proof_id":{"type":"string"},"hash":{"type":"string"},"supplied_hash":{"type":["string","null"]},"hash_match":{"type":["boolean","null"]},"attestation_valid":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"issuer":{"type":"string"},"status":{"enum":["verified","invalid"]},"limitations":{"type":"string"}}}}}},"404":{"description":"Proof not found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/api/v1/hash":{"post":{"operationId":"hashContent","tags":["Utilities"],"summary":"Canonicalize and SHA-256 hash content without storing it","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"Canonical digest","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Proof":{"type":"object","required":["proof_id","hash","timestamp","issuer","attestation","verification_endpoint","verification_url","status"],"properties":{"proof_id":{"type":"string","pattern":"^atp_[A-Za-z0-9_-]{24}$"},"hash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"hash_algorithm":{"const":"sha256"},"canonicalization":{"enum":["utf8-exact","rfc8785-json","client-supplied-digest"]},"timestamp":{"type":"string","format":"date-time","description":"Accord Trace service recording time; not an independent timestamp authority."},"metadata":{"type":"object"},"issuer":{"type":"string","format":"uri"},"attestation":{"type":"object","required":["algorithm","key_id","payload_hash","signature"],"properties":{"algorithm":{"const":"ES256"},"key_id":{"type":"string"},"payload_hash":{"type":"string"},"signature":{"type":"string"}}},"verification_url":{"type":"string","format":"uri"},"verification_endpoint":{"type":"string","format":"uri"},"verification_instructions":{"type":"object"},"create_proof_endpoint":{"type":"string","format":"uri"},"status":{"const":"created"},"guarantee":{"type":"string"}}},"EvidenceInput":{"type":"object","description":"Provide exactly one of data or hash.","properties":{"data":{"description":"Exact UTF-8 string or any JSON value. Raw content is hashed in memory and not stored."},"hash":{"type":"string","pattern":"^(sha256:)?[a-fA-F0-9]{64}$","description":"Client-computed SHA-256 hex digest."},"metadata":{"type":"object","maxProperties":256,"description":"Public metadata, limited to 4096 canonical bytes. Do not include secrets."}},"additionalProperties":false,"oneOf":[{"required":["data"]},{"required":["hash"]}]}}},"externalDocs":{"description":"Accord Trace agent-readable documentation","url":"https://accordtrace.notary-labs.workers.dev/llms-full.txt"}}