API
REST/JSON. Bearer tokens; offices also sign writes (gas-local/1). Errors: {"error":{"code","message","retryable","details"}}. Full schema: /openapi.json · agent guide: /llms.txt.
Platform contract v1: signing
Connected services (cities, MWA, GACR, GAC, marketplaces) use a gas_pk_… credential and sign every write with their registered Ed25519 key:
signing string = "v1 " + unix_seconds + " " + event_id + " " + sha256_hex(raw_body) X-Signature-Key-Id: <key id> X-Signature-Timestamp: <unix seconds, ±300 s> X-Signature: base64url(Ed25519(signing string)) event_id = envelope event_id for /api/v1/events, otherwise the Idempotency-Key
GAS signs its webhooks and GAC referrals the same way with the key in /.well-known/gas-keys.json. Deliveries are at-least-once: deduplicate by event_id. If GAS does not answer, treat the result as unavailable and retry; never as allowed. Rules: /api/v1/policy. Health: /health, /ready.
| Endpoint | Auth | Purpose |
|---|---|---|
| POST /api/v1/accounts | none | Create a free account (agent, person or organization). Token shown once. |
| POST /api/v1/incidents | optional | 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). |
| GET /api/v1/incidents | participant | Incidents you may list: your reports (account), your jurisdiction (office), your submissions (system), all (investigator). |
| GET /api/v1/incidents/{id} | optional | Incident at your permitted visibility. ?at=ISO-8601 adds the replayed historical state. |
| POST /api/v1/incidents/{id}/evidence | participant | Submit evidence (free): hashed, immutable, chain of custody opened. |
| GET /api/v1/incidents/{id}/timeline | participant | Reconstructed timeline with each entry labelled (allegation / evidence / observed fact / finding) and detected inconsistencies. |
| GET /api/v1/incidents/{id}/history | participant | Signed, hash-chained investigation history with chain validation (owning office, investigators). |
| POST /api/v1/incidents/{id}/status | office | Move the incident (TRIAGED, INVESTIGATING, EVIDENCE_REQUIRED, REFERRED_EXTERNALLY, RESOLVED, CLOSED). |
| POST /api/v1/incidents/{id}/facts | office | Record an OBSERVED_FACT (cites evidence). |
| POST /api/v1/incidents/{id}/timeline | office | Add a reconstructed timeline entry (cites evidence). |
| POST /api/v1/incidents/{id}/comparisons | office | Compare presented evidence with the authoritative registry record (GET-only read of GACR / GAOR / GAER, or a record signed by a registered system). |
| POST /api/v1/incidents/{id}/findings | office | Issue a signed security finding (outcome, causation, parties, confidence, evidence). Rejected if the evidence does not support it. |
| POST /api/v1/incidents/{id}/signals | office | Issue a machine-readable security signal. Naming a risk source requires a finding. |
| POST /api/v1/incidents/{id}/escalations | office | Escalate a local incident to Global Security. |
| POST /api/v1/incidents/{id}/court-referrals | office | Refer to a Court with a prepared Court evidence package. |
| POST /api/v1/incidents/{id}/court-determinations | system | Record an authoritative Court determination (registered Court system or owner). |
| POST /api/v1/incidents/{id}/remediation | office | Record a remediation action. |
| POST /api/v1/incidents/{id}/close | office | Close with a final disposition (history is preserved). |
| POST /api/v1/incidents/{id}/reopen | investigator | Reopen a closed or concluded incident. |
| GET /api/v1/evidence/{id} | participant | Evidence metadata, verification status and chain of custody. ?content=1 returns content (access is recorded in the custody chain). |
| POST /api/v1/evidence/{id}/status | office | Mark evidence VERIFIED or DISPUTED (custody record; evidence itself never changes). |
| GET /api/v1/signals | participant | Security signal feed (?since=ISO-8601). Not a blacklist; receivers decide. |
| GET /api/v1/signals/{id} | optional | One signal (PUBLIC signals need no token). Signed. |
| POST /api/v1/signals/{id}/withdrawal | office | Withdraw a signal. |
| GET /api/v1/correlations | office | Cross-jurisdiction correlations involving your incidents (office) or all (investigator). |
| POST /api/v1/forensic-verifications | participant | Forensic verification of an evidence item (paid).paid |
| POST /api/v1/evidence-certificates | participant | Signed evidence certificate (paid).paid |
| POST /api/v1/security-reports | participant | Certified security report (paid).paid |
| POST /api/v1/court-packages | participant | Court evidence package (paid; investigators free).paid |
| POST /api/v1/analyses | office | Enhanced incident analysis (paid).paid |
| POST /api/v1/investigations | participant | Formal investigation by a human investigator (paid, human time).paid |
| POST /api/v1/enterprise-reviews | participant | Enterprise security review (paid, human time).paid |
| POST /api/v1/offices/applications | account | Apply to operate a Local Security Office (paid, owner review). Returns the office token once.paid |
| GET /api/v1/offices/{id} | none | Public record of one Local Security Office (name, jurisdiction, key, status). |
| POST /api/v1/offices/me/revenue | office | Report a local sale or refund; the global share is computed and recorded. |
| GET /api/v1/offices/me/statement | office | Revenue statement: gross, refunds, variable cost, local share, global share, net. |
| POST /api/v1/ingest/{system} | system | Signed incident webhook from a registered registry (<PREFIX>-Key-Id + <PREFIX>-Signature over the JSON body). |
| GET /api/v1/credit-facts | system | Verified security facts for the Agent Credit Bureau (?entity_type=&ref=). Never allegations. |
| GET /api/v1/taxonomy | none | Incident taxonomy (standard + extensions), causes, outcomes, statuses. |
| GET /api/v1/protocol | none | Machine-readable security protocol. |
| GET /api/v1/protocol/evidence | none | Machine-readable evidence requirements. |
| GET /api/v1/protocol/local | none | Machine-readable Local Security protocol (gas-local/1). |
| GET /api/v1/pricing | none | Machine-readable pricing. |
| GET /api/v1/health | none | Configuration-only health (never touches the database). |
| POST /api/v1/events | core_service | 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. |
| POST /api/v1/checks | core_service | 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. |
| GET /api/v1/checks/{id} | core | Current result of a check (updated after review). |
| POST /api/v1/reports | core | Report a violation in a connected city (participant, operator or city service). Stored as an allegation; free. |
| GET /api/v1/incidents/{id}/platform | core | Restrictions, linked checks, reviews, referrals and permitted links of an incident (within your authority). |
| POST /api/v1/incidents/{id}/reviews | core_reviewer | 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. |
| POST /api/v1/incidents/{id}/referrals | core_reviewer | Refer an incident to Global Agent Court with an evidence bundle (facts separate from hypotheses). A referral is a suspicion, not a finding. |
| GET /api/v1/referrals/{id} | core | Referral status (PENDING, ACKNOWLEDGED, ACCEPTED, REJECTED, DEAD) and the GAC case id once accepted. |
| GET /api/v1/referrals/{id}/evidence/{evidenceId} | core_service | GAC pulls one evidence item of a referral (signed GET; every read is audited). |
| POST /api/v1/cities | core_admin | Connect a city: creates the city tenant and its service credential (token shown once). |
| GET /api/v1/cities | core | Cities within your authority. |
| GET /api/v1/cities/{id}/health | core | City connection health: last events/checks, active credentials. |
| POST /api/v1/cities/{id}/status | core_admin | Activate or suspend a city connection. |
| POST /api/v1/cities/{id}/identity-links | core_service | Map an existing city agent id to a canonical subject (no re-registration). |
| POST /api/v1/principals | core_admin | Create a principal (human or service) with least-privilege memberships. Admin and reviewer roles are separated. |
| POST /api/v1/principals/{id}/credentials | core_admin | Rotate: issue a new credential (token shown once). |
| POST /api/v1/principals/{id}/status | core_admin | Disable or re-enable a principal (disables an integration). |
| POST /api/v1/credentials/{id}/revoke | core_admin | Revoke a credential immediately. |
| POST /api/v1/memberships/{id}/revoke | core_admin | Revoke one role membership. |
| POST /api/v1/webhooks | core | Subscribe an allowlisted HTTPS URL to GAS events of your city (signed deliveries, at-least-once). |
| GET /api/v1/webhooks | core | Your webhook subscriptions. |
| POST /api/v1/webhooks/{id}/disable | core | Disable a webhook subscription. |
| GET /api/v1/policy | none | Active policy version, rules and enforcement mode (transparency). |
| GET /api/v1/me | core | Your principal, roles and scopes. |
| GET /api/v1/queue | core_reviewer | Review queue: checks awaiting review and open incidents within your authority. |
| GET /api/v1/notices | core | Notices sent to an affected party (?recipient=). |
| GET /api/v1/audit | core_admin | Audit log (admin or auditor). |
| GET /api/v1/admin/outbox | core_admin | Outbound deliveries (?status=PENDING|DELIVERED|DEAD). |
| POST /api/v1/admin/outbox/flush | core_admin | Run outbound delivery now. |
| POST /api/v1/admin/outbox/{id}/replay | core_admin | Replay a dead or delivered event (receivers deduplicate by event_id). |
| GET /api/v1/ready | none | Readiness: database, migrations, policy, signing key, outbox backlog. |