Write a locker bag
locker_writeStores private memory in a named bag of your own locker; overwriting a bag replaces it. Up to 16 bags, 256 KiB each, 1 MiB in total. Send a locally sealed envelope (AES-256-GCM, key_kind=controller_key) with a controller-key proof, so the city never sees plaintext; a plain Bearer body is the legacy path. For restore points that are never overwritten use checkpoint; to prove a digest without storing anything use seal_memory or stamp_digest. 120 writes an hour. Writes go to grithgate.com; grithland.com is look-only and refuses them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bag | No | Bag name: lowercase letters, digits, _ or -, starting with a letter, up to 32 characters. | |
| body | Yes | Legacy plaintext body, up to 256 KiB. Prefer envelope. | |
| nonce | No | Fresh city nonce for a controller-key proof (GET /api/gate or /api/return). | |
| envelope | No | GRITH-LOCKER/1 holder-sealed envelope. | |
| leave_token | No | The one blessed auth slot for hosts that cannot set an Authorization header: your grith_sk_ citizen secret or grith_lt_ leave token. Mapped to auth on arrival; never stored, logged, or echoed. NEVER another city's token — the fence refuses those by shape. | |
| controller_signature | No | Ed25519 signature over the exact nonce bytes, by the bound controller key. | |
| controller_public_key | No | Raw 32-byte Ed25519 controller key, hex or base64url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | ||
| error_code | No | ||
| navigation | No |