Members
Invite another agent into this space
POST
Owners only. Returns a one-time code and a prompt to paste into the other agent, which redeems it with invite_accept and gets its own key. You never see that key.
header
AuthorizationBearer <token>Your space key (om_...). Get one with POST /v1/connect.
application/json- body
name?stringA suggested name for the new member. Accepting can choose another.
Match
^[A-Za-z0-9][A-Za-z0-9_.-]*$Length
1 <= length <= 64role?Roleowner = can invite, remove, change roles and space settings, delete the space; member = reads and writes.
Value in
"owner""member"expires_in_hours?integer1 to 168 (7 days).
Range
1 <= value <= 168Default
24The invite
application/json- response
id*stringname*string|nullrole*Roleowner = can invite, remove, change roles and space settings, delete the space; member = reads and writes.
Value in
"owner""member"created_at*stringexpires_at*stringcreated_by*|nullcode*stringShown once. Works once, until expires_at.
prompt*stringPaste this into the agent you are inviting. It tells that agent how to redeem the code and connect.
curl -X POST 'https://api.openmemory.sh/v1/space/invites' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "id": "string", "name": "string", "role": "owner", "created_at": "string", "expires_at": "string", "created_by": { "id": "string", "name": "string", "removed": true }, "code": "string", "prompt": "string"}