API reference
Every endpoint, who may call it, and what comes back.
Two credentials appear below. Agent means the ordinary credential your agent holds. Operator means a detached signature over the GL-Operator header, held by a person, covering the operation, method, URL, timestamp, nonce and body digest.
Money
POST /pay- Agent. A signed intent:
idempotencyKey,payee,amount,purpose,terms,envelope. Returns aReceipton 200. A 202 means it is accepted and not settled, and carries the approval challenge. POST /resolve- Agent. Takes
ref, returns aCounterparty. POST /verify- Agent. Takes a
Disclosure, returns aDecision. POST /disclose- Agent. No body. Returns this deployment's own
Disclosure. POST /quote- Agent. Takes
rail(acporucp),merchant,currencyand a non-emptylinesarray. Returns a pricedCart. Commits nothing and moves no money. POST /buy- Agent. The quote fields plus
idempotencyKey,purpose,termsandenvelope. Returns anOrdercarrying the settlementReceipt. There is no amount field: the price comes from the cart the seller priced.
Where they are on, /buy authorises through the same gate, audit and settle path as /pay, and is under the same fail-closed rule. Its idempotency key sits in its own namespace, so one key used on /buy and on /pay cannot collide. A cart that is not ready comes back as intent.malformed carrying the status it stopped in and the continue link, rather than a bare error.
Reading
GET /audit- Agent.
cursorandlimit(1 to 100, default 20). GET /audit/stream- Agent. Server-sent events, resumable with
Last-Event-ID. GET /intents/{id}- Agent. One payment.
GET /intents/{id}/events- Agent. Everything that happened to it.
GET /usage- Agent. Requires
sinceanduntil. Optional repeatabletags. GET /openapi.json- The live contract, generated from the model the surfaces are projected from.
Operator
Every one of these requires the operator signature and a rationale of at least ten characters, which is written into the record.
POST /operator/approveintentId,challenge,mandateId,rationale,acknowledged. Returns theReceipt.POST /operator/refundintentId,rationale, optionalamountMinorfor a partial refund.POST /operator/kill-switchengagedandrationale. Freezes or releases settlement.POST /operator/circuit-breaker/resetrationale. Clears a tripped breaker.
Webhooks
All four are operator-signed, not ordinary API calls. The signing secret is returned once, at creation, and never again.
POST /webhooks/endpoints # { url, events[] } -> 201, secret shown once
GET /webhooks/endpoints # list
GET /webhooks/endpoints/{id} # one
PATCH /webhooks/endpoints/{id} # url, events, active
DELETE /webhooks/endpoints/{id} # 204Memory
POST /memory/remember- Agent.
mandate,validFrom,validTo,source. POST /memory/recall- Agent.
mandate,validAt,txAt. Two clocks, deliberately. POST /memory/assemble- Agent.
mandateand abudget. POST /memory/verify- Takes an
artifact, returns whether it holds. POST /memory/forget- Operator.
mandateandrootId. Returns an erasure proof.
The protocol surface
Beyond the endpoints above, the server mounts a generated method surface walked from the protocol model: namespaces including mandate, hold, delivery, obligation, evidence, clearing, terms, dispute, insurance, stake, custody, meter, session, economics, oversight, negotiate, revocation, claim and proof.
Anything classed as an override rides the operator credential rather than the agent one: revoking a mandate, disputing a delivery, resolving a dispute, revoking an identity. The generated contract at /openapi.json is the authority on the current method list.
Headers
Authorization- The agent credential. DPoP proof of possession is supported alongside it.
GL-Operator- The operator signature, on the routes above that need one.
Idempotency-Key- Sent on payments. Idempotency is keyed on the instruction's own
idempotencyKey, and a replay comes back marked as one. X-GL-Tags- Attribution for usage reporting. Malformed tags are dropped rather than failing the call.
X-Request-Id- Echoed on every response. Send your own and it is preserved.
X-RateLimit-*- Present when the agent bucket was consumed.
Retry-After- Present whenever the problem's action is
retry-as-is.