Records
Create a record, or update the one with the same key
POST
On an update by key, fields you send replace the old values and fields you leave out keep them. data is replaced whole; to change single fields, use record_update.
header
AuthorizationBearer <token>Your space key (om_...). Create one with POST /v1/spaces.
collection*stringCollection name, e.g. commitments, goals, routines.
Match
^[A-Za-z0-9][A-Za-z0-9_.-]*$Length
1 <= length <= 64application/json- body
key?stringOptional unique key within the collection. Writing it again updates that record: fields you send replace the old values, and fields you leave out keep them.
Length
1 <= length <= 200status?stringA new record defaults to an empty status.
Length
length <= 50due_at?|Send null to clear it on an update by key.
Format
date-timedata?Replaces all of the record's data when sent. A new record defaults to {}. To change single fields, use record_update.
origin?stringA new record defaults to agent.
Value in
"user""agent"Updated by key
application/json- response
record*created*booleancurl -X POST 'https://api.openmemory.sh/v1/collections/string/records' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "record": { "id": "string", "collection": "string", "key": "string", "status": "string", "due_at": "string", "data": { "property1": null, "property2": null }, "origin": "user", "version": 0, "created_at": "string", "updated_at": "string" }, "created": true}