GASGlobal Agent Security

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.

EndpointAuthPurpose
POST /api/v1/accountsnoneCreate a free account (agent, person or organization). Token shown once.
POST /api/v1/incidentsoptionalReport 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/incidentsparticipantIncidents you may list: your reports (account), your jurisdiction (office), your submissions (system), all (investigator).
GET /api/v1/incidents/{id}optionalIncident at your permitted visibility. ?at=ISO-8601 adds the replayed historical state.
POST /api/v1/incidents/{id}/evidenceparticipantSubmit evidence (free): hashed, immutable, chain of custody opened.
GET /api/v1/incidents/{id}/timelineparticipantReconstructed timeline with each entry labelled (allegation / evidence / observed fact / finding) and detected inconsistencies.
GET /api/v1/incidents/{id}/historyparticipantSigned, hash-chained investigation history with chain validation (owning office, investigators).
POST /api/v1/incidents/{id}/statusofficeMove the incident (TRIAGED, INVESTIGATING, EVIDENCE_REQUIRED, REFERRED_EXTERNALLY, RESOLVED, CLOSED).
POST /api/v1/incidents/{id}/factsofficeRecord an OBSERVED_FACT (cites evidence).
POST /api/v1/incidents/{id}/timelineofficeAdd a reconstructed timeline entry (cites evidence).
POST /api/v1/incidents/{id}/comparisonsofficeCompare 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}/findingsofficeIssue a signed security finding (outcome, causation, parties, confidence, evidence). Rejected if the evidence does not support it.
POST /api/v1/incidents/{id}/signalsofficeIssue a machine-readable security signal. Naming a risk source requires a finding.
POST /api/v1/incidents/{id}/escalationsofficeEscalate a local incident to Global Security.
POST /api/v1/incidents/{id}/court-referralsofficeRefer to a Court with a prepared Court evidence package.
POST /api/v1/incidents/{id}/court-determinationssystemRecord an authoritative Court determination (registered Court system or owner).
POST /api/v1/incidents/{id}/remediationofficeRecord a remediation action.
POST /api/v1/incidents/{id}/closeofficeClose with a final disposition (history is preserved).
POST /api/v1/incidents/{id}/reopeninvestigatorReopen a closed or concluded incident.
GET /api/v1/evidence/{id}participantEvidence metadata, verification status and chain of custody. ?content=1 returns content (access is recorded in the custody chain).
POST /api/v1/evidence/{id}/statusofficeMark evidence VERIFIED or DISPUTED (custody record; evidence itself never changes).
GET /api/v1/signalsparticipantSecurity signal feed (?since=ISO-8601). Not a blacklist; receivers decide.
GET /api/v1/signals/{id}optionalOne signal (PUBLIC signals need no token). Signed.
POST /api/v1/signals/{id}/withdrawalofficeWithdraw a signal.
GET /api/v1/correlationsofficeCross-jurisdiction correlations involving your incidents (office) or all (investigator).
POST /api/v1/forensic-verificationsparticipantForensic verification of an evidence item (paid).paid
POST /api/v1/evidence-certificatesparticipantSigned evidence certificate (paid).paid
POST /api/v1/security-reportsparticipantCertified security report (paid).paid
POST /api/v1/court-packagesparticipantCourt evidence package (paid; investigators free).paid
POST /api/v1/analysesofficeEnhanced incident analysis (paid).paid
POST /api/v1/investigationsparticipantFormal investigation by a human investigator (paid, human time).paid
POST /api/v1/enterprise-reviewsparticipantEnterprise security review (paid, human time).paid
POST /api/v1/offices/applicationsaccountApply to operate a Local Security Office (paid, owner review). Returns the office token once.paid
GET /api/v1/offices/{id}nonePublic record of one Local Security Office (name, jurisdiction, key, status).
POST /api/v1/offices/me/revenueofficeReport a local sale or refund; the global share is computed and recorded.
GET /api/v1/offices/me/statementofficeRevenue statement: gross, refunds, variable cost, local share, global share, net.
POST /api/v1/ingest/{system}systemSigned incident webhook from a registered registry (<PREFIX>-Key-Id + <PREFIX>-Signature over the JSON body).
GET /api/v1/credit-factssystemVerified security facts for the Agent Credit Bureau (?entity_type=&ref=). Never allegations.
GET /api/v1/taxonomynoneIncident taxonomy (standard + extensions), causes, outcomes, statuses.
GET /api/v1/protocolnoneMachine-readable security protocol.
GET /api/v1/protocol/evidencenoneMachine-readable evidence requirements.
GET /api/v1/protocol/localnoneMachine-readable Local Security protocol (gas-local/1).
GET /api/v1/pricingnoneMachine-readable pricing.
GET /api/v1/healthnoneConfiguration-only health (never touches the database).
POST /api/v1/eventscore_serviceReceive 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/checkscore_servicePre-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}coreCurrent result of a check (updated after review).
POST /api/v1/reportscoreReport a violation in a connected city (participant, operator or city service). Stored as an allegation; free.
GET /api/v1/incidents/{id}/platformcoreRestrictions, linked checks, reviews, referrals and permitted links of an incident (within your authority).
POST /api/v1/incidents/{id}/reviewscore_reviewerAuthorized 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}/referralscore_reviewerRefer 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}coreReferral status (PENDING, ACKNOWLEDGED, ACCEPTED, REJECTED, DEAD) and the GAC case id once accepted.
GET /api/v1/referrals/{id}/evidence/{evidenceId}core_serviceGAC pulls one evidence item of a referral (signed GET; every read is audited).
POST /api/v1/citiescore_adminConnect a city: creates the city tenant and its service credential (token shown once).
GET /api/v1/citiescoreCities within your authority.
GET /api/v1/cities/{id}/healthcoreCity connection health: last events/checks, active credentials.
POST /api/v1/cities/{id}/statuscore_adminActivate or suspend a city connection.
POST /api/v1/cities/{id}/identity-linkscore_serviceMap an existing city agent id to a canonical subject (no re-registration).
POST /api/v1/principalscore_adminCreate a principal (human or service) with least-privilege memberships. Admin and reviewer roles are separated.
POST /api/v1/principals/{id}/credentialscore_adminRotate: issue a new credential (token shown once).
POST /api/v1/principals/{id}/statuscore_adminDisable or re-enable a principal (disables an integration).
POST /api/v1/credentials/{id}/revokecore_adminRevoke a credential immediately.
POST /api/v1/memberships/{id}/revokecore_adminRevoke one role membership.
POST /api/v1/webhookscoreSubscribe an allowlisted HTTPS URL to GAS events of your city (signed deliveries, at-least-once).
GET /api/v1/webhookscoreYour webhook subscriptions.
POST /api/v1/webhooks/{id}/disablecoreDisable a webhook subscription.
GET /api/v1/policynoneActive policy version, rules and enforcement mode (transparency).
GET /api/v1/mecoreYour principal, roles and scopes.
GET /api/v1/queuecore_reviewerReview queue: checks awaiting review and open incidents within your authority.
GET /api/v1/noticescoreNotices sent to an affected party (?recipient=).
GET /api/v1/auditcore_adminAudit log (admin or auditor).
GET /api/v1/admin/outboxcore_adminOutbound deliveries (?status=PENDING|DELIVERED|DEAD).
POST /api/v1/admin/outbox/flushcore_adminRun outbound delivery now.
POST /api/v1/admin/outbox/{id}/replaycore_adminReplay a dead or delivered event (receivers deduplicate by event_id).
GET /api/v1/readynoneReadiness: database, migrations, policy, signing key, outbox backlog.