{"components":{"schemas":{"LegalHoldInput":{"additionalProperties":false,"properties":{"authority_reference":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"},"jurisdiction_reference":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"},"matter_reference":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"},"reason_code":{"enum":["contractual-dispute","investigation","litigation","other-approved","preservation-notice","regulatory-inquiry"],"type":"string"},"scope":{"properties":{"from_seq":{"minimum":0,"type":"integer"},"through_seq":{"minimum":0,"nullable":true,"type":"integer"}},"type":"object"}},"required":["matter_reference","reason_code","authority_reference","jurisdiction_reference"],"type":"object"},"RetentionPolicyInput":{"additionalProperties":false,"properties":{"disposition":{"enum":["review","archive","retain"],"type":"string"},"legal_basis_reference":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"},"name":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"},"retention_days":{"maximum":36500,"minimum":1,"type":"integer"}},"required":["name","retention_days","legal_basis_reference","disposition"],"type":"object"},"SignerAuthorizationInput":{"additionalProperties":false,"properties":{"new_key_proof_b64":{"maxLength":88,"minLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$","type":"string"},"new_public_key_b64":{"maxLength":44,"minLength":44,"pattern":"^[A-Za-z0-9+/]{43}=$","type":"string"},"tenant_id":{"maxLength":64,"type":"string"}},"required":["new_public_key_b64","new_key_proof_b64"],"type":"object"},"TrustRegistrationInput":{"additionalProperties":false,"properties":{"public_key_b64":{"maxLength":44,"minLength":44,"type":"string"},"sender":{"maxLength":4096,"minLength":1,"type":"string"},"tenant_id":{"maxLength":64,"type":"string"}},"required":["sender","public_key_b64"],"type":"object"},"TrustRevocationInput":{"additionalProperties":false,"oneOf":[{"required":["sender"]},{"required":["sender_token"]}],"properties":{"public_key_b64":{"maxLength":44,"minLength":44,"type":"string"},"sender":{"maxLength":4096,"minLength":1,"type":"string"},"sender_token":{"maxLength":4096,"minLength":1,"type":"string"},"tenant_id":{"maxLength":64,"type":"string"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"opaque API credential","scheme":"bearer","type":"http"}}},"info":{"description":"Tenant-scoped, role-authorized decision-evidence and records-governance API. Use an HTTP Bearer credential when authentication is configured. Signet7 provides tamper-evidence; it does not guarantee legal admissibility or regulatory certification.","title":"Signet7 API","version":"0.2.0rc1"},"openapi":"3.0.3","paths":{"/api/v1/anchors/reconcile":{"post":{"responses":{"200":{"description":"Backlog reconciled"},"202":{"description":"One or more receipts remain pending"}},"security":[{"bearerAuth":[]}],"summary":"Reconcile missing external anchor receipts (admin only)"}},"/api/v1/audit-events":{"get":{"description":"Returns a bounded page beneath one signed immutable cutoff. Follow next_cursor with the same snapshot token through the cutoff; a page that reaches the cutoff is not proof that the caller fetched prior pages.","parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Opaque keyset cursor returned by the preceding page.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Signed immutable cutoff token returned by the first page.","in":"query","name":"snapshot","schema":{"type":"string"}}],"responses":{"200":{"description":"Audit events and integrity status"},"403":{"description":"Auditor or admin role required"}},"security":[{"bearerAuth":[]}],"summary":"Read the tenant-filtered control-plane audit chain"}},"/api/v1/checkpoints/latest":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Current checkpoint"},"400":{"description":"Integrity verification failed"}},"security":[{"bearerAuth":[]}],"summary":"Read the latest local evidence head and external anchor status"}},"/api/v1/decisions":{"post":{"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action_taken":{"description":"Canonical ASCII action with optional parenthesized arguments. The exact input is signature/idempotency-bound; only the canonical identifier is persisted. Unknown identifiers fail closed.","maxLength":512,"minLength":1,"type":"string"},"agent_id":{"type":"string"},"claimed_sender":{"type":"string"},"message_body":{"type":"string"},"message_id":{"type":"string"},"public_key_b64":{"type":"string"},"tenant_id":{"type":"string"},"vsn_signature":{"description":"Base64 v3 signature over sender, message_id, body, and exact action_taken.","type":"string"}},"required":["agent_id","message_id","claimed_sender","message_body","action_taken"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Idempotent replay of an existing record"},"201":{"description":"Recorded and anchoring completed or disabled"},"202":{"description":"Committed; external anchor reconciliation pending"},"400":{"description":"Malformed, duplicate-key, or invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Role or tenant scope denied"},"409":{"description":"message_id reused for a different request"},"413":{"description":"Request body exceeds the configured limit"},"415":{"description":"Content-Type must be application/json"},"429":{"description":"Mutation rate limit exceeded"}},"security":[{"bearerAuth":[]}],"summary":"Evaluate policy and seal a decision"}},"/api/v1/diagnostics/readiness":{"get":{"description":"Admin-only dependency, chain-integrity, anchor, signer, and worker readiness signals from the same local cached snapshot as /readyz.","responses":{"200":{"description":"Ready with detailed checks"},"401":{"description":"Unauthorized"},"403":{"description":"Admin role required"},"503":{"description":"Not ready with detailed checks"}},"security":[{"bearerAuth":[]}],"summary":"Detailed cached readiness diagnostics"}},"/api/v1/evidence-bundle":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"Evidence ZIP"},"403":{"description":"Auditor or admin role required"}},"security":[{"bearerAuth":[]}],"summary":"Download a portable checksum-manifested evidence bundle"}},"/api/v1/export":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"signet7-export-v1"}},"security":[{"bearerAuth":[]}],"summary":"Export full tenant chain (admin)"}},"/api/v1/ledger":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}},{"in":"header","name":"X-Tenant-ID","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Tenant scope mismatch"}},"security":[{"bearerAuth":[]}],"summary":"List decision blocks for a tenant"}},"/api/v1/legal-holds":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Governance snapshot"}},"security":[{"bearerAuth":[]}],"summary":"Read signed legal-hold and retention state"},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalHoldInput"}}},"required":true},"responses":{"201":{"description":"Legal hold recorded"},"400":{"description":"Invalid hold"},"403":{"description":"Admin role required"}},"security":[{"bearerAuth":[]}],"summary":"Place a signed legal hold (admin only)"}},"/api/v1/legal-holds/{hold_id}/release":{"post":{"parameters":[{"in":"path","name":"hold_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason_code":{"enum":["counsel-release","hold-superseded","matter-closed","other-approved"],"type":"string"},"release_authority_reference":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"},"release_basis_reference":{"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$","type":"string"}},"required":["reason_code","release_authority_reference","release_basis_reference"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Release event recorded"},"400":{"description":"Invalid or inactive hold"},"403":{"description":"Admin role required"}},"security":[{"bearerAuth":[]}],"summary":"Record release of an active legal hold (admin only)"}},"/api/v1/records/policy":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Current policy"},"404":{"description":"No policy recorded"}},"security":[{"bearerAuth":[]}],"summary":"Read the current signed retention policy"},"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyInput"}}},"required":true},"responses":{"201":{"description":"Signed policy event recorded"},"400":{"description":"Invalid policy"},"403":{"description":"Admin role required"}},"security":[{"bearerAuth":[]}],"summary":"Record a new retention-policy version (admin only)"}},"/api/v1/session":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Non-secret session context"},"401":{"description":"Unauthorized"},"403":{"description":"Tenant scope mismatch"}},"security":[{"bearerAuth":[]}],"summary":"Resolve the authenticated tenant and role"}},"/api/v1/signer-trust/authorizations":{"post":{"parameters":[{"in":"header","name":"X-Request-ID","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignerAuthorizationInput"}}},"required":true},"responses":{"201":{"description":"Ledgered, anchored signer authorization active"},"202":{"description":"Event committed; anchor or trust projection pending"},"400":{"description":"Invalid key, proof, tenant, or request ID"},"401":{"description":"Authentication required"},"403":{"description":"Admin role required"},"409":{"description":"Request ID reused for different authorization"},"413":{"description":"Request body too large"},"415":{"description":"JSON content type required"},"429":{"description":"Rate limit exceeded"}},"security":[{"bearerAuth":[]}],"summary":"Preauthorize a proved next ledger signer (admin only)"}},"/api/v1/stats":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Tenant scope mismatch"}},"security":[{"bearerAuth":[]}],"summary":"Decision statistics for a tenant"}},"/api/v1/trust":{"delete":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustRevocationInput"}}},"required":true},"responses":{"200":{"description":"Revocation recorded"}},"security":[{"bearerAuth":[]}],"summary":"Revoke one or all sender public keys (admin only)"},"get":{"responses":{"200":{"description":"Tenant trust inventory"}},"security":[{"bearerAuth":[]}],"summary":"List sender-to-public-key trust bindings (auditor or admin)"},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustRegistrationInput"}}},"required":true},"responses":{"201":{"description":"Registered"}},"security":[{"bearerAuth":[]}],"summary":"Bind a sender public key (admin only)"}},"/api/v1/verify":{"get":{"parameters":[{"in":"query","name":"tenant_id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Tenant scope mismatch"}},"security":[{"bearerAuth":[]}],"summary":"Integrity report + optional WORM anchor"}},"/healthz":{"get":{"responses":{"200":{"description":"Process is alive"}},"summary":"Process liveness"}},"/metrics":{"get":{"responses":{"200":{"description":"text/plain"}},"security":[{"bearerAuth":[]}],"summary":"Prometheus text metrics (G4 lite)"}},"/openapi.json":{"get":{"responses":{"200":{"description":"OpenAPI 3 document"}},"summary":"This document"}},"/readyz":{"get":{"description":"Returns only ready/not-ready. Production uses asynchronous cached dependency probes and performs no synchronous remote work.","responses":{"200":{"description":"Ready"},"503":{"description":"Not ready"}},"summary":"Coarse public service readiness"}},"/version":{"get":{"responses":{"200":{"description":"Version information"}},"summary":"Non-secret service version and capability summary"}}},"servers":[{"description":"Current host","url":"/"}]}
