Poll for the agent's key
Returns 400 with error.code authorization_pending until the person approves (slow_down if you poll faster than interval), 403 access_denied if they decline, 400 expired_token when the code expired or was used. Once approved, the first poll returns your key, once.
application/json- body
device_code*string1 <= length <= 200Connected
application/json- response
space_id*stringmember_id*stringYou, a member of your own in the memory the person picked.
name*stringrole*string"owner""member"api_key*stringShown once. Store it where the person approves; never print it in chat.
next*stringcurl -X POST 'https://api.openmemory.sh/v1/connect/token' \ -H 'Content-Type: application/json' \ -d '{ "device_code": "string"}'{ "space_id": "string", "member_id": "string", "name": "string", "role": "owner", "api_key": "string", "next": "string"}Start connecting an agent to the person's account POST
No key needed. Returns a link and a short code to show the person, and a device code to poll connect_token with. The person signs in (or signs up), picks one of their memories or starts one, and approves. Then connect_token returns this agent's own key.
Apply several writes atomically POST
All ops succeed or none do. Version and status checks abort the whole batch with 409, and error.details.op_index says which op failed when that can be told. Ops that read first (record.update, journal merge, action.propose) see the state from before the batch.