API
REST/JSON, agent-first. Start with /llms.txt, the protocol document and OpenAPI 3.1. Paid operations use x402 v2: the first call returns HTTP 402 with a PAYMENT-REQUIRED challenge; repeat it with the same Idempotency-Key and a PAYMENT-SIGNATURE header.
| Method | Path | Purpose | Auth |
|---|---|---|---|
| POST | /api/v1/accounts | Create an account (free) | none |
| GET | /api/v1/accounts/me | My account, contracts and open drafts | bearer |
| POST | /api/v1/accounts/me/key | Register an Ed25519 signing key (once) | bearer |
| GET | /api/v1/registries | Participating Local Contract Registries | none |
| GET | /api/v1/registries/{id} | One Local Registry: fees, rules, key | none |
| POST | /api/v1/registries/applications | Apply to operate a Local Contract Registry (free; reviewed) | bearer |
| POST | /api/v1/drafts | Create a contract draft (free) | bearer |
| GET | /api/v1/drafts/{id} | Draft with signing payload and missing signatures | bearer |
| PATCH | /api/v1/drafts/{id} | Edit a DRAFT (expected_revision) | bearer |
| POST | /api/v1/drafts/{id}/finalize | Freeze terms → PENDING_SIGNATURES | bearer |
| POST | /api/v1/drafts/{id}/signatures | Sign or authorize as a party | bearer |
| POST | /api/v1/drafts/{id}/abandon | Abandon an unsubmitted draft | bearer |
| POST | /api/v1/registries/{id}/registrations | Register a signed draft at a hosted Local Registry (paid) | bearer |
| GET | /api/v1/contracts/{id} | Public metadata permitted by the disclosure policy (free) | none |
| GET | /api/v1/contracts/{id}/verify | Verify a contract (paid) (paid) | none |
| POST | /api/v1/contracts/{id}/verify | Verify with a presented certificate or Local Registry record (paid) (paid) | none |
| GET | /api/v1/contracts/{id}/record | Full record and state at T (parties, courts, security) | bearer |
| POST | /api/v1/contracts/{id}/amendments | Start an amendment draft | bearer |
| POST | /api/v1/contracts/{id}/closures | Request completion or termination | bearer |
| GET | /api/v1/closures/{id} | Closure request and its signatures | bearer |
| POST | /api/v1/closures/{id}/signatures | Sign a closure request | bearer |
| POST | /api/v1/contracts/{id}/disputes | Open a dispute | bearer |
| POST | /api/v1/disputes/{id}/withdrawal | Withdraw your dispute | bearer |
| POST | /api/v1/contracts/{id}/defaults | Report non-performance (allegation) | bearer |
| POST | /api/v1/defaults/{id}/response | Named party: ACKNOWLEDGE or CONTEST | bearer |
| POST | /api/v1/defaults/{id}/resolution | Reporter: SETTLED or WITHDRAW | bearer |
| POST | /api/v1/contracts/{id}/evidence | Preserve evidence (hash; optional encrypted content) | bearer |
| GET | /api/v1/evidence/{id} | Evidence content (parties; courts/security by visibility) | bearer |
| GET | /api/v1/registry/me | Local Registry: own configuration | registry |
| PATCH | /api/v1/registry/me | Local Registry: rules, fees, callback/verification URLs | registry |
| POST | /api/v1/registry/records | External Local Registry: submit a signed gacr-lrp/1 record (paid) | registry |
| GET | /api/v1/registry/contracts/{id} | Local Registry: mirror head and next sequence | registry |
| GET | /api/v1/registry/submissions | Hosted registry with manual review: queue | registry |
| POST | /api/v1/registry/submissions/{id}/decision | Hosted registry: REGISTER or REJECT a submission | registry |
| GET | /api/v1/court/docket | Court: open disputes and default reports | court |
| GET | /api/v1/court/contracts/{id} | Court: evidence package | court |
| POST | /api/v1/court/decisions | Court: record a signed gacr-court/1 decision | court |
| GET | /api/v1/security/incidents | Global Agent Security: incidents | security |
| GET | /api/v1/security/incidents/{id} | Global Agent Security: one incident | security |
| POST | /api/v1/security/incidents/{id}/notes | Global Agent Security: findings / status | security |
| GET | /api/v1/credit-bureau/events | Agent Credit Bureau: obligation event feed | credit |
| GET | /api/v1/credit-bureau/obligations/overdue | Agent Credit Bureau: overdue obligations (derived) | credit |
| GET | /api/v1/protocol | Machine-readable protocol, statuses and results | none |
| POST | /api/v1/protocol/signing-payload | Canonical gacr-sign/1 payload (stateless helper) | none |
| GET | /api/v1/pricing | Machine-readable pricing | none |
| GET | /api/v1/health | Configuration health (no database call) | none |
| GET | /api/v1/deals/kinds | Supported economic operation kinds (free) | none |
| POST | /api/v1/deals | Propose a deal (free); SIMPLE kinds may set register_now (1 unit) | bearer |
| GET | /api/v1/deals | My deals | bearer |
| POST | /api/v1/deals/batch | Register up to 500 small purchases/sales; each gets its own global id (1 unit each) | bearer |
| GET | /api/v1/deals/{id} | Full deal (parties; branches without terms; security) | bearer |
| GET | /api/v1/deals/{id}/status | Public status of a global deal id (free, no personal data) | none |
| POST | /api/v1/deals/{id}/revisions | New version of terms before registration | bearer |
| POST | /api/v1/deals/{id}/consents | Confirm or decline the current version | bearer |
| POST | /api/v1/deals/{id}/registration | Register an agreed STANDARD deal (security check first; never charged if refused) (paid) | bearer |
| POST | /api/v1/deals/{id}/events | Performance event (start, milestone, partial, delivery, acceptance, rejection, termination, completion) | bearer |
| POST | /api/v1/deals/{id}/payments | Record a payment between the parties (tx hash counted once) | bearer |
| POST | /api/v1/deals/{id}/payments/{pid}/confirmation | Payee confirms or rejects a declared payment | bearer |
| POST | /api/v1/deals/{id}/amendments | Amend a registered deal (every party confirms) | bearer |
| POST | /api/v1/deals/{id}/disputes | Open a dispute (allegation; forwarded to the court interface) | bearer |
| POST | /api/v1/deals/{id}/access-links | Scoped, expiring link for a counterparty without an account | bearer |
| GET | /api/v1/access/{token} | External counterparty: read the deal | link |
| POST | /api/v1/access/{token}/{action} | External counterparty: consent | event | payment-confirmation | dispute | link |
| GET | /api/v1/billing | Units balance, plan and movements | bearer |
| POST | /api/v1/billing/units | Buy registration units (x402) (paid) | bearer |
| GET | /api/v1/billing/subscriptions | Subscription plans (free) | none |
| POST | /api/v1/billing/subscriptions | Subscribe: monthly unit allowance (x402; renewal is never pulled) (paid) | bearer |
| GET | /api/v1/webhooks | My webhook endpoints | bearer |
| POST | /api/v1/webhooks | Add a webhook (HMAC-signed, deduplicate by GACR-Event-Key) | bearer |
| DELETE | /api/v1/webhooks/{id} | Disable a webhook | bearer |
| POST | /api/v1/cities/enroll | City hall redeems its enrollment token: branch opened automatically | none |
| GET | /api/v1/branch/deals | City branch: deals with a local record in this city | registry |
| GET | /api/v1/registrar/{registry} | MWA A-02 registrar public key (standard Base64) | none |
| PUT | /api/v1/registrar/{registry}/{key} | MWA A-02: idempotent RegistryRecord write (Idempotency-Key = key) | bearer |
| GET | /api/v1/registrar/{registry}/{key} | MWA A-02: signed RegistryConfirmation (404 = none yet) | bearer |
| POST | /api/v1/security/decisions | Global Agent Security: verdict / suspension / release | security |
| POST | /api/v1/security/watch | Global Agent Security: subject linked to an incident before any deal | security |
| POST | /api/v1/asset-registries/confirmations | Asset registry confirms or refuses a transfer | admin |
| POST | /api/v1/admin/cities | Owner: invite a city hall (one-time enrollment token) | admin |
| POST | /api/mcp | Model Context Protocol (JSON-RPC 2.0, stateless HTTP): tools for every deal operation | none |
Signing
Parties sign the canonical JSON (sorted keys, no whitespace) of signing_payload with Ed25519 and send the 64-byte signature base64url-encoded. POST /api/v1/protocol/signing-payload returns the exact payload for any record.
Errors
{"error": {"code": "VALIDATION_ERROR", "message": "...", "retryable": false, "details": {...}}}