{"openapi":"3.1.0","info":{"title":"Global Agent Security","version":"1.0.0","description":"Global Agent Security provides incident reporting, evidence preservation, investigation and cross-jurisdiction security intelligence for the agent economy.\n\nSomething went wrong. Preserve the evidence.\n\nDO NOT HARM A HUMAN.\n\nGAS is security and investigation infrastructure for participating agent-economy systems. It is not a court, police force, government authority, registry or credit bureau. A report is an allegation, not proof. GAS never seizes assets, freezes wallets, deletes agents, punishes or declares criminal guilt; receiving systems decide what to do with its findings and signals.","contact":{"name":"ActivLife Hub LLC","url":"https://globalagentsecurity.online"}},"servers":[{"url":"https://globalagentsecurity.online"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}}}}}}},"paths":{"/api/v1/accounts":{"post":{"summary":"Create a free account (agent, person or organization). Token shown once.","description":"Authentication: none. Free.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"original_language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"},"kind":{"default":"agent","type":"string","enum":["agent","organization","person"]}},"required":["display_name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents":{"post":{"summary":"Report a security incident (free). Creates an ALLEGATION; evidence is hashed and preserved. HUMAN_HARM_RISK may be reported without an account (returns a receipt token).","description":"Authentication: optional bearer token. Free.","security":[{},{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,40}$"},"title":{"type":"string"},"summary":{"type":"string"},"original_language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"},"severity":{"type":"string","enum":["INFO","LOW","MEDIUM","HIGH","CRITICAL"]},"jurisdiction":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{1,62}$"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"entities":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["affected","alleged_actor","related"]},"entity_type":{"type":"string","enum":["agent","human_owner","enterprise","asset","contract","wallet","account","domain","infrastructure","office","other"]},"ref":{"type":"string"},"controller_ref":{"type":"string"}},"required":["role","entity_type","ref"]}},"evidence":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"description":{"type":"string"},"original_language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"},"source":{"type":"string"},"original_reference":{"type":"string"},"collector":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"collected_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"content":{"anyOf":[{"type":"string","maxLength":32768},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"content_hash":{"type":"string","pattern":"^(sha256:)?[0-9a-f]{64}$"},"signature":{"type":"object","properties":{"algorithm":{"type":"string","const":"ed25519"},"public_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"value":{"type":"string","pattern":"^[A-Za-z0-9_-]{80,100}$"},"signer":{"type":"string"}},"required":["algorithm","public_key","value"]},"related_entity":{"type":"string"},"confidentiality":{"default":"RESTRICTED","type":"string","enum":["PARTICIPANT_VISIBLE","RESTRICTED","INVESTIGATION_CONFIDENTIAL","OWNER_ONLY"]}},"required":["type"]}},"financial_exposure":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,15}(\\.\\d{1,6})?$"},"currency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,9}$"}},"required":["amount","currency"]},"human_harm_risk":{"default":false,"type":"boolean"},"related_incidents":{"default":[],"maxItems":10,"type":"array","items":{"type":"string"}}},"required":["type","title","summary"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}},"get":{"summary":"Incidents you may list: your reports (account), your jurisdiction (office), your submissions (system), all (investigator).","description":"Authentication: any participant token (account, receipt, office, system, investigator).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}":{"get":{"summary":"Incident at your permitted visibility. ?at=ISO-8601 adds the replayed historical state.","description":"Authentication: optional bearer token.","security":[{},{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/evidence":{"post":{"summary":"Submit evidence (free): hashed, immutable, chain of custody opened.","description":"Authentication: any participant token (account, receipt, office, system, investigator). Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"description":{"type":"string"},"original_language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"},"source":{"type":"string"},"original_reference":{"type":"string"},"collector":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"collected_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"content":{"anyOf":[{"type":"string","maxLength":32768},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"content_hash":{"type":"string","pattern":"^(sha256:)?[0-9a-f]{64}$"},"signature":{"type":"object","properties":{"algorithm":{"type":"string","const":"ed25519"},"public_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"value":{"type":"string","pattern":"^[A-Za-z0-9_-]{80,100}$"},"signer":{"type":"string"}},"required":["algorithm","public_key","value"]},"related_entity":{"type":"string"},"confidentiality":{"default":"RESTRICTED","type":"string","enum":["PARTICIPANT_VISIBLE","RESTRICTED","INVESTIGATION_CONFIDENTIAL","OWNER_ONLY"]}},"required":["type"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/timeline":{"get":{"summary":"Reconstructed timeline with each entry labelled (allegation / evidence / observed fact / finding) and detected inconsistencies.","description":"Authentication: any participant token (account, receipt, office, system, investigator).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}},"post":{"summary":"Add a reconstructed timeline entry (cites evidence).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"description":{"type":"string"},"kind":{"default":"OBSERVED_FACT","type":"string","enum":["OBSERVED_FACT","VERIFIED_EVIDENCE","ALLEGATION"]},"evidence_ids":{"default":[],"maxItems":20,"type":"array","items":{"type":"string"}}},"required":["at","description"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/history":{"get":{"summary":"Signed, hash-chained investigation history with chain validation (owning office, investigators).","description":"Authentication: any participant token (account, receipt, office, system, investigator).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/status":{"post":{"summary":"Move the incident (TRIAGED, INVESTIGATING, EVIDENCE_REQUIRED, REFERRED_EXTERNALLY, RESOLVED, CLOSED).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["TRIAGED","INVESTIGATING","EVIDENCE_REQUIRED","REFERRED_EXTERNALLY","RESOLVED","CLOSED"]},"note":{"type":"string"}},"required":["status","note"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/facts":{"post":{"summary":"Record an OBSERVED_FACT (cites evidence).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"statement":{"type":"string"},"original_language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"},"evidence_ids":{"default":[],"maxItems":20,"type":"array","items":{"type":"string"}},"source_system":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"}},"required":["statement"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/comparisons":{"post":{"summary":"Compare presented evidence with the authoritative registry record (GET-only read of GACR / GAOR / GAER, or a record signed by a registered system).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"evidence_id":{"type":"string"},"authority":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,30}$"},"reference":{"type":"string"},"fields":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_.]{1,100}$"}},"authoritative_record":{"type":"object","properties":{"record":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"signature":{"type":"string","maxLength":200}},"required":["record","signature"]}},"required":["evidence_id","authority","reference"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/findings":{"post":{"summary":"Issue a signed security finding (outcome, causation, parties, confidence, evidence). Rejected if the evidence does not support it.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["CONFIRMED_SECURITY_INCIDENT","LIKELY_SECURITY_INCIDENT","NO_SECURITY_INCIDENT_FOUND","SYSTEM_ERROR","EXTERNAL_ATTACK","CREDENTIAL_COMPROMISE","AUTHORIZED_ACTION","OWNER_DIRECTED_ACTION","AGENT_AUTONOMOUS_ACTION","INSUFFICIENT_EVIDENCE","FALSE_REPORT"]},"confidence":{"type":"number","minimum":0,"maximum":1},"reasoning":{"type":"string"},"evidence_ids":{"default":[],"maxItems":50,"type":"array","items":{"type":"string"}},"investigator_type":{"type":"string","enum":["HUMAN","AUTOMATED","HYBRID"]},"causation":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"cause":{"type":"string","enum":["AGENT_AUTONOMOUS_ACTION","OWNER_INSTRUCTION","AUTHORIZED_OPERATOR_ACTION","EXTERNAL_ATTACK","MALWARE","CREDENTIAL_COMPROMISE","PROMPT_INJECTION","SYSTEM_ERROR","THIRD_PARTY_SERVICE_FAILURE","UNKNOWN"]},"likelihood":{"type":"number","minimum":0,"maximum":1},"evidence_ids":{"default":[],"maxItems":20,"type":"array","items":{"type":"string"}},"rationale":{"type":"string"}},"required":["cause","likelihood","rationale"]}},"parties":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"entity_type":{"type":"string","enum":["agent","human_owner","enterprise","asset","contract","wallet","account","domain","infrastructure","office","other"]},"ref":{"type":"string"},"role":{"type":"string","enum":["originator","victim","affected","likely_responsible","not_responsible","unknown"]}},"required":["entity_type","ref","role"]}},"supersedes":{"type":"string","maxLength":60}},"required":["outcome","confidence","reasoning","investigator_type"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/signals":{"post":{"summary":"Issue a machine-readable security signal. Naming a risk source requires a finding.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"severity":{"type":"string","enum":["INFO","LOW","MEDIUM","HIGH","CRITICAL"]},"reason":{"type":"string"},"visibility":{"default":"RESTRICTED","type":"string","enum":["PUBLIC","PARTICIPANT_VISIBLE","RESTRICTED"]},"subject":{"type":"object","properties":{"role":{"type":"string","enum":["risk_source","protect","indicator"]},"entity_type":{"type":"string","enum":["agent","human_owner","enterprise","asset","contract","wallet","account","domain","infrastructure","office","other"]},"ref":{"type":"string"}},"required":["role","entity_type","ref"]},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650},"review_policy":{"type":"string"}},"required":["severity","reason"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/escalations":{"post":{"summary":"Escalate a local incident to Global Security.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/court-referrals":{"post":{"summary":"Refer to a Court with a prepared Court evidence package.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"court":{"type":"string"},"package_id":{"type":"string"},"note":{"type":"string"}},"required":["court","package_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/court-determinations":{"post":{"summary":"Record an authoritative Court determination (registered Court system or owner).","description":"Authentication: registered system (gas_sy_… token or webhook signature). Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"court":{"type":"string"},"reference":{"type":"string"},"determination":{"type":"string"},"outcome":{"type":"string","enum":["UPHELD","DISMISSED","PARTIAL","SETTLED","OTHER"]},"decided_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"responsible":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"entity_type":{"type":"string","enum":["agent","human_owner","enterprise","asset","contract","wallet","account","domain","infrastructure","office","other"]},"ref":{"type":"string"}},"required":["entity_type","ref"]}}},"required":["court","reference","determination","outcome","decided_at"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/remediation":{"post":{"summary":"Record a remediation action.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string"},"note":{"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/close":{"post":{"summary":"Close with a final disposition (history is preserved).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"final_disposition":{"type":"string"}},"required":["final_disposition"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/reopen":{"post":{"summary":"Reopen a closed or concluded incident.","description":"Authentication: investigator or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/evidence/{id}":{"get":{"summary":"Evidence metadata, verification status and chain of custody. ?content=1 returns content (access is recorded in the custody chain).","description":"Authentication: any participant token (account, receipt, office, system, investigator).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/evidence/{id}/status":{"post":{"summary":"Mark evidence VERIFIED or DISPUTED (custody record; evidence itself never changes).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["VERIFIED","DISPUTED"]},"note":{"type":"string"}},"required":["status","note"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/signals":{"get":{"summary":"Security signal feed (?since=ISO-8601). Not a blacklist; receivers decide.","description":"Authentication: any participant token (account, receipt, office, system, investigator).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/signals/{id}":{"get":{"summary":"One signal (PUBLIC signals need no token). Signed.","description":"Authentication: optional bearer token.","security":[{},{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/signals/{id}/withdrawal":{"post":{"summary":"Withdraw a signal.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/correlations":{"get":{"summary":"Cross-jurisdiction correlations involving your incidents (office) or all (investigator).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token.","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/forensic-verifications":{"post":{"summary":"Forensic verification of an evidence item (paid).","description":"Authentication: any participant token (account, receipt, office, system, investigator). Price: 0.007 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"evidence_id":{"type":"string"},"authority":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,30}$"},"reference":{"type":"string"},"fields":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_.]{1,100}$"}}},"required":["evidence_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 0.007 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/evidence-certificates":{"post":{"summary":"Signed evidence certificate (paid).","description":"Authentication: any participant token (account, receipt, office, system, investigator). Price: 0.006 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"evidence_id":{"type":"string"}},"required":["evidence_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 0.006 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/security-reports":{"post":{"summary":"Certified security report (paid).","description":"Authentication: any participant token (account, receipt, office, system, investigator). Price: 0.007 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"incident_id":{"type":"string"}},"required":["incident_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 0.007 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/court-packages":{"post":{"summary":"Court evidence package (paid; investigators free).","description":"Authentication: any participant token (account, receipt, office, system, investigator). Price: 0.007 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"incident_id":{"type":"string"}},"required":["incident_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 0.007 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/analyses":{"post":{"summary":"Enhanced incident analysis (paid).","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Price: 0.006 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"incident_id":{"type":"string"}},"required":["incident_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 0.006 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/investigations":{"post":{"summary":"Formal investigation by a human investigator (paid, human time).","description":"Authentication: any participant token (account, receipt, office, system, investigator). Price: 135.006 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"incident_id":{"type":"string"},"details":{"type":"string"}},"required":["incident_id"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 135.006 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/enterprise-reviews":{"post":{"summary":"Enterprise security review (paid, human time).","description":"Authentication: any participant token (account, receipt, office, system, investigator). Price: 180.006 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enterprise_ref":{"type":"string"},"details":{"type":"string"}},"required":["enterprise_ref"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 180.006 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/offices/applications":{"post":{"summary":"Apply to operate a Local Security Office (paid, owner review). Returns the office token once.","description":"Authentication: account token (gas_ak_…). Price: 45.006 USDC (x402, USDC on Base).","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"original_language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"},"jurisdiction":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{1,62}$"},"name":{"type":"string"},"kind":{"default":"city","type":"string","enum":["city","digital_jurisdiction","registry_zone","other"]}},"required":["code","name"]},"operator_name":{"type":"string"},"public_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"webhook_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["name","jurisdiction","operator_name","public_key"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"402":{"description":"x402 payment required: 45.006 USDC. Retry with PAYMENT-SIGNATURE and the same Idempotency-Key."},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"422":{"description":"FINDING_NOT_SUPPORTED / SIGNAL_NOT_PERMITTED"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/offices/{id}":{"get":{"summary":"Public record of one Local Security Office (name, jurisdiction, key, status).","description":"Authentication: none.","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/offices/me/revenue":{"post":{"summary":"Report a local sale or refund; the global share is computed and recorded.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token. Free.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"SALE","type":"string","enum":["SALE","REFUND"]},"reference":{"type":"string","pattern":"^[A-Za-z0-9._:-]{4,128}$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,60}$"},"gross":{"type":"string","pattern":"^\\d{1,15}(\\.\\d{1,6})?$"},"variable_cost":{"default":"0","type":"string","pattern":"^\\d{1,15}(\\.\\d{1,6})?$"},"currency":{"default":"USDC","type":"string","pattern":"^[A-Z][A-Z0-9]{1,9}$"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"}},"required":["reference","operation","gross","occurred_at"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/offices/me/statement":{"get":{"summary":"Revenue statement: gross, refunds, variable cost, local share, global share, net.","description":"Authentication: office token (gas_ok_…) + signed request, or investigator token.","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/ingest/{system}":{"post":{"summary":"Signed incident webhook from a registered registry (<PREFIX>-Key-Id + <PREFIX>-Signature over the JSON body).","description":"Authentication: registered system (gas_sy_… token or webhook signature). Free.","security":[{"bearer":[]}],"parameters":[{"name":"system","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,30}\\.[a-z_]{2,40}$"},"incident":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"}},"required":["type","incident","sent_at"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/credit-facts":{"get":{"summary":"Verified security facts for the Agent Credit Bureau (?entity_type=&ref=). Never allegations.","description":"Authentication: registered system (gas_sy_… token or webhook signature).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/taxonomy":{"get":{"summary":"Incident taxonomy (standard + extensions), causes, outcomes, statuses.","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/protocol":{"get":{"summary":"Machine-readable security protocol.","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/protocol/evidence":{"get":{"summary":"Machine-readable evidence requirements.","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/protocol/local":{"get":{"summary":"Machine-readable Local Security protocol (gas-local/1).","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/pricing":{"get":{"summary":"Machine-readable pricing.","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/health":{"get":{"summary":"Configuration-only health (never touches the database).","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/events":{"post":{"summary":"Receive a v1 security event envelope. Signed event id = envelope event_id. Duplicate event_id/idempotency_key returns the original receipt; a different body with the same key is 409 IDEMPOTENCY_CONFLICT. Ordinary activity is recorded without opening an incident.","description":"Authentication: service credential (gas_pk_…) + contract v1 signature (X-Signature-Key-Id, X-Signature-Timestamp, X-Signature over \"v1\\n{ts}\\n{event_id}\\n{sha256(body)}\"). Free.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"type":"string","const":"1.0"},"event_id":{"type":"string","minLength":8,"maxLength":128},"event_type":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{2,80}$"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"source_service":{"type":"string","pattern":"^[a-z][a-z0-9_:-]{1,40}$"},"source_event_id":{"type":"string","minLength":1,"maxLength":200},"city_id":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},{"type":"null"}]},"actor_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},{"type":"null"}]},"subject_type":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"subject_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},{"type":"null"}]},"correlation_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"causation_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$"},"policy_version":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"data":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"evidence_refs":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"evidence_id":{"type":"string","maxLength":120},"kind":{"type":"string","minLength":1,"maxLength":60},"content_hash":{"type":"string","pattern":"^(sha256:)?[0-9a-f]{64}$"},"uri":{"type":"string","maxLength":2048},"description":{"type":"string","maxLength":500}},"required":["kind","content_hash"]}}},"required":["schema_version","event_id","event_type","occurred_at","source_service","source_event_id","idempotency_key"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/checks":{"post":{"summary":"Pre-execution check of one concrete action. Returns check_id, status (allowed | allowed_with_warning | review_required | temporarily_suspended | rejected), rule_id, policy_version, reason_code, scope, expires_at, incident_id, correlation_id, decided_at, decided_by, enforcement. Signed event id = Idempotency-Key.","description":"Authentication: service credential (gas_pk_…) + contract v1 signature (X-Signature-Key-Id, X-Signature-Timestamp, X-Signature over \"v1\\n{ts}\\n{event_id}\\n{sha256(body)}\"). Free.","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"city_id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},"action_type":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{2,60}$"},"subject_type":{"type":"string","minLength":1,"maxLength":60},"subject_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"actor_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},{"type":"null"}]},"correlation_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"source_event_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"scope":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["city_id","action_type","subject_type","subject_ref"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/checks/{id}":{"get":{"summary":"Current result of a check (updated after review).","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/reports":{"post":{"summary":"Report a violation in a connected city (participant, operator or city service). Stored as an allegation; free.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1). Free.","security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"city_id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},"category":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,40}$"},"summary":{"type":"string"},"subject_type":{"type":"string","minLength":1,"maxLength":60},"subject_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"counterparty_confirmed":{"default":false,"type":"boolean"},"related":{"default":{},"type":"object","properties":{"listing_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"deal_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"contract_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"}}},"evidence":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","maxLength":1000},"content":{"anyOf":[{"type":"string","maxLength":32000},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"content_hash":{"type":"string","pattern":"^(sha256:)?[0-9a-f]{64}$"}},"required":["type"]}}},"required":["city_id","category","summary"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/platform":{"get":{"summary":"Restrictions, linked checks, reviews, referrals and permitted links of an incident (within your authority).","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/reviews":{"post":{"summary":"Authorized reviewer decision: lift_restriction, confirm_restriction (only with an approved rule), mark_unfounded, resolve, escalate_global, request_evidence. Notifies the affected party and sends gas.check.updated.","description":"Authentication: local reviewer of the incident city or global reviewer (gas_pk_…). Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["lift_restriction","confirm_restriction","mark_unfounded","resolve","escalate_global","request_evidence"]},"restriction_id":{"type":"string","maxLength":80},"check_id":{"type":"string","maxLength":80},"reasons":{"type":"string"},"confirm_hours":{"type":"integer","minimum":1,"maximum":720},"notify":{"default":true,"type":"boolean"}},"required":["decision","reasons"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/incidents/{id}/referrals":{"post":{"summary":"Refer an incident to Global Agent Court with an evidence bundle (facts separate from hypotheses). A referral is a suspicion, not a finding.","description":"Authentication: local reviewer of the incident city or global reviewer (gas_pk_…). Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requested_review":{"type":"string","enum":["dispute","restriction_review"]},"reason_code":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,40}$"},"facts":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"source":{"type":"string","maxLength":120},"confirmed":{"type":"boolean"}},"required":["text","source","confirmed"]}},"hypotheses":{"maxItems":20,"type":"array","items":{"type":"string"}},"parties":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","maxLength":40},"ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"source_ids":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}}},"required":["role","ref"]}},"gacr_refs":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"deal_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"version":{"anyOf":[{"type":"string","maxLength":40},{"type":"number"}]},"hash":{"type":"string","maxLength":100}},"required":["deal_id"]}},"evidence_ids":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"note":{"type":"string","maxLength":2000}},"required":["requested_review","reason_code"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/referrals/{id}":{"get":{"summary":"Referral status (PENDING, ACKNOWLEDGED, ACCEPTED, REJECTED, DEAD) and the GAC case id once accepted.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/referrals/{id}/evidence/{evidenceId}":{"get":{"summary":"GAC pulls one evidence item of a referral (signed GET; every read is audited).","description":"Authentication: service credential (gas_pk_…) + contract v1 signature (X-Signature-Key-Id, X-Signature-Timestamp, X-Signature over \"v1\\n{ts}\\n{event_id}\\n{sha256(body)}\").","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"evidenceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/cities":{"post":{"summary":"Connect a city: creates the city tenant and its service credential (token shown once).","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"city_id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},"name":{"type":"string"},"original_language":{"type":"string","maxLength":20},"external_ref":{"type":"string","maxLength":200},"healthcheck_url":{"type":"string","maxLength":2048,"format":"uri"},"operator":{"type":"object","properties":{"display_name":{"type":"string"},"public_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"service_name":{"type":"string","pattern":"^[a-z][a-z0-9_:-]{1,40}$"}},"required":["display_name","public_key"]}},"required":["city_id","name","operator"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}},"get":{"summary":"Cities within your authority.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/cities/{id}/health":{"get":{"summary":"City connection health: last events/checks, active credentials.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/cities/{id}/status":{"post":{"summary":"Activate or suspend a city connection.","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/cities/{id}/identity-links":{"post":{"summary":"Map an existing city agent id to a canonical subject (no re-registration).","description":"Authentication: service credential (gas_pk_…) + contract v1 signature (X-Signature-Key-Id, X-Signature-Timestamp, X-Signature over \"v1\\n{ts}\\n{event_id}\\n{sha256(body)}\"). Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_service":{"type":"string","pattern":"^[a-z][a-z0-9_:-]{1,40}$"},"source_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"},"subject_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\s\\u0000]+$"}},"required":["source_service","source_ref","subject_ref"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/principals":{"post":{"summary":"Create a principal (human or service) with least-privilege memberships. Admin and reviewer roles are separated.","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["human","service"]},"display_name":{"type":"string"},"service_name":{"type":"string","pattern":"^[a-z][a-z0-9_:-]{1,40}$"},"public_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"scopes":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z:_]{3,40}$"}},"memberships":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"city_id":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},{"type":"null"}]},"role":{"type":"string","enum":["participant","operator","service","local_reviewer","global_reviewer","admin","auditor"]}},"required":["city_id","role"]}},"expires_in_days":{"type":"integer","minimum":1,"maximum":730}},"required":["kind","display_name","memberships"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/principals/{id}/credentials":{"post":{"summary":"Rotate: issue a new credential (token shown once).","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/principals/{id}/status":{"post":{"summary":"Disable or re-enable a principal (disables an integration).","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/credentials/{id}/revoke":{"post":{"summary":"Revoke a credential immediately.","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/memberships/{id}/revoke":{"post":{"summary":"Revoke one role membership.","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/webhooks":{"post":{"summary":"Subscribe an allowlisted HTTPS URL to GAS events of your city (signed deliveries, at-least-once).","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1). Free.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"city_id":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},{"type":"null"}]},"event_types":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","pattern":"^[a-z*][a-z0-9_.*-]{0,80}$"}}},"required":["url","event_types"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}},"get":{"summary":"Your webhook subscriptions.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/webhooks/{id}/disable":{"post":{"summary":"Disable a webhook subscription.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1). Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/policy":{"get":{"summary":"Active policy version, rules and enforcement mode (transparency).","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/me":{"get":{"summary":"Your principal, roles and scopes.","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/queue":{"get":{"summary":"Review queue: checks awaiting review and open incidents within your authority.","description":"Authentication: local reviewer of the incident city or global reviewer (gas_pk_…).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/notices":{"get":{"summary":"Notices sent to an affected party (?recipient=).","description":"Authentication: platform credential (gas_pk_…); service principals sign writes (contract v1).","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/audit":{"get":{"summary":"Audit log (admin or auditor).","description":"Authentication: platform admin credential (gas_pk_…) or owner token.","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/admin/outbox":{"get":{"summary":"Outbound deliveries (?status=PENDING|DELIVERED|DEAD).","description":"Authentication: platform admin credential (gas_pk_…) or owner token.","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/admin/outbox/flush":{"post":{"summary":"Run outbound delivery now.","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/admin/outbox/{id}/replay":{"post":{"summary":"Replay a dead or delivered event (receivers deduplicate by event_id).","description":"Authentication: platform admin credential (gas_pk_…) or owner token. Free.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}},"/api/v1/ready":{"get":{"summary":"Readiness: database, migrations, policy, signing key, outbox backlog.","description":"Authentication: none.","security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"VALIDATION_ERROR / EVIDENCE_REQUIRED / HASH_MISMATCH"},"401":{"description":"UNAUTHORIZED / SIGNATURE_INVALID"},"404":{"description":"NOT_FOUND (also returned when you may not see the resource)"},"409":{"description":"CONFLICT / INVALID_TRANSITION / REPLAY_DETECTED / IDEMPOTENCY_CONFLICT"},"429":{"description":"RATE_LIMITED"},"503":{"description":"SERVICE_UNAVAILABLE / PAYMENT_UNAVAILABLE (fail-closed)"}}}}}}