API reference Mandates
Store a passkey-signed mandate
POST/v1/mandates
Verifies the passkey assertion over M = SHA-256("keelson/mandate-challenge/v1" || 0x00 || H_sd || C_m) and stores the mandate as SIGNED, or ACTIVE when it allows several merchants.
Headers
Content-Typeapplication/jsonRequiredidempotency-keystringRequiredIdempotency-KeystringRequired- 1 to 255 characters. A retry with the same key returns the first answer.
Request body
application/json
payloadSdobjectRequired- The SD-JWT payload with its
_sddigests, as signed. disclosuresarray of stringRequired- Every disclosure of the payload; each digest must resolve.
commitmentstringRequiredC_m; must equal the payload'szk.commitment.saltstring- The salt that opens
C_m; the TEE needs it to issue the mandate. assertionobjectRequired- A WebAuthn or Secure Payment Confirmation assertion, base64url fields.
connectionobject- The agent's request this mandate approves, by its user code. The mandate must name the asking agent's operator and grant no more than it asked;
askAboveMinormay only be lower too.
Responses
- 201The mandate was stored
- 401Not signed in, or the signature is invalid
- 403The passkey is not the signer's
- 409The mandate is already stored
- 422The mandate is invalid (
invalid-mandate), or it binds an agent key, a bond, an engine build, a policy set or terms other than the onesPOST /v1/mandates/compilefills: the named operator's registeredcnfkey, its bond vault with the 50 PYUSD minimum, the engine version and TEE measurements of the build the legs run (or of another build admitted during a rotation), the current policy set hash and the current terms (mandate-binding-mismatch;fieldsnamesagent.cnf,agent.bond,policy.engine,policy.version,policy.measurements,policy.policy_set_hashorconsent) - 429Too many approvals by user code
- 503The TEE could not issue the mandate
201 response
idstringRequiredmandateHashstringRequiredstatestringRequiredACTIVEat once when the mandate allows several merchants: each cart is then held on its own.One ofSIGNEDACTIVEopenMandatestringRequired- The open mandate (L2) the TEE issued; the agent closes it per purchase.