KV
Set a value (optionally compare-and-set)
PUT
header
AuthorizationBearer <token>Your space key (om_...). Create one with POST /v1/spaces.
ns*stringNamespace, e.g. settings or cursors. Names starting with '_' are reserved.
Match
^[A-Za-z0-9][A-Za-z0-9_.-]*$Length
1 <= length <= 64key*stringLength
1 <= length <= 200application/json- body
value?unknownAny JSON value.
expected_version?integer0 = only create; n = only update if at version n. Omit to upsert.
Range
0 <= valueexpires_at?|Format
date-timeSaved
application/json- response
ns*stringkey*stringvalue?unknownversion*integerexpires_at*string|nullupdated_at*stringcurl -X PUT 'https://api.openmemory.sh/v1/kv/string/string' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "ns": "string", "key": "string", "value": null, "version": 0, "expires_at": "string", "updated_at": "string"}