Skip to content
v0.5.1GitHub

Using

Inserts or updates a value for the given key (upsert semantics). The optional `ttl` query parameter sets an expiry in seconds; omitting it stores the key indefinitely. `If-Match` (an ETag from a prior read) or `If-None-Match: *` (create only) make the write conditional; without them the last writer wins.

applies to v0.5.1
PUT
/store-api/kv/{domain}/keys/{key}
curl --request PUT \
--url https://example.com/store-api/kv/example/keys/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/plain' \
--data example
domain
required
string

Domain name

key
required
string

Key (valid UTF-8, max 256 bytes)

ttl
integer format: int64

TTL in seconds (optional)

If-Match
string | null

ETag from a prior read: write only if it is still the key’s current version, else 412

If-None-Match
string | null

Only *: write only if the key does not exist, else 412. Evaluated after If-Match

Media typetext/plain
string

Key upserted

Invalid key, or invalid If-Match / If-None-Match header

Media typetext/plain
string

Domain not found

Media typetext/plain
string

Domain is being deleted

Media typetext/plain
string

If-Match or If-None-Match does not hold; nothing was written

Media typetext/plain
string
ETag
string

ETag of the key’s current version; absent when the key does not exist

The domain requires conditional writes and neither If-Match nor If-None-Match is set

Media typetext/plain
string
Cache-Control
string

No-store

Rate limit exceeded

Media typetext/plain
string
Retry-After
integer format: int64

Insufficient Storage — disk space or memory runs short; the write was not applied. Reads go on; retry after the seconds in Retry-After.

Media typetext/plain
string
Retry-After
integer