Home / API / Append lanes

Append lanes

A write-only channel attached to a vault, gated by a token the writer holds and nothing else. This is the transport behind vault-to-vault messaging and behind sg.append in the browser bridge — and it is deliberately generic: the same primitive carries messages, logs, signals, control messages and state flows.

Naming. This API was called inbox before v0.32.7. Every /api/vault/inbox/* URL is gone, and purge takes folder:"pending" or "processed" — the old "inbox" value returns 400. If you are reading older material, translate.

The six endpoints

All POST, all under /api/vault/append/.

PathGateDoes
configure/{vault_id}x-sgraph-vault-write-keyRegisters append_anchors — hashes of accepted senders — and enum_key_hash
write/{vault_id}append_token in the bodyAppends a payload. Account-less: no access token required
list/{vault_id}x-sgraph-vault-enum-keyPaginated listing, optionally with inline content
fetch/{vault_id}enum keyFetch specific file IDs, batched
mark-processed/{vault_id}enum keyMoves pending → processed. Idempotent
purge/{vault_id}write keyDeletes. folder: "pending" | "processed"

Why the gates are split this way

Four capabilities, and the split is the whole design:

CapabilityHolderCanCannot
append_tokenthe senderwritelist, fetch, read anything
enum_keythe vault ownerlist, fetch, mark-processedwrite, purge
write_keythe vault ownerconfigure, purge
private keythe vault ownerdecryptnever sent to the server

A sender can put something into your vault and learn nothing at all — not the contents, not the volume, not whether anyone else writes there. The server stores SHA-256 of the first three capabilities and compares hashes; the fourth it never sees.

Four contracts worth relying on

Several senders on one vault

Register several append_anchors and each sender writes into their own lane, distinguished by their token. A listing can be scoped to one lane, so one correspondent flooding you does not bury another — and revoking one sender is removing one anchor, with no effect on the rest.

Limits and codes

LimitValueOn breach
Payload per write5 MB413
Pending files per token1000507
File IDs per batch100400
Inline content when listing3 MB cumulative413
Page size50 default, 200 maxclamped silently

The append_token pattern is ^[0-9a-f]{16,128}$ — hex only. A prefixed token returns 400, not 403; see errors for why that distinction saves time.

See also