Update a member's role (owner/admin)
Sets a member's role and returns the updated membership. Custom roles need permissions enabled. Setting owner adds an owner, and only an owner can grant it.
Required permission
Checked against the member.manage permission for the resource it acts on. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl organizations member-role update <user-id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
orgId*stringuserId*stringapplication/json- body
Send role or roleId.
role?stringA built-in role. billing and inference need permissions enabled. Only an owner grants owner.
"owner""admin""member""viewer""billing""inference"roleId?stringA custom role's id (role_...), for an organization with permissions enabled.
Updated
application/json- response
userId*stringrole*stringroleName?stringThe role's display name (permissions enabled only).
email?stringfullName?stringavatarUrl?stringinvitedAt?stringjoinedAt?stringstatus?stringSet only on the addOrgMember response, where it is "invited": the invite is recorded and emailed, and the user becomes a member only after accepting it. Listed and updated members omit it, and "active" is not returned.
"active""invited"curl -X PATCH 'https://api.openrelay.inc/v1/orgs/string/members/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "userId": "string", "role": "string", "roleName": "string", "email": "string", "fullName": "string", "avatarUrl": "string", "invitedAt": "string", "joinedAt": "string", "status": "active"}Leave an organization POST
Removes the signed-in user from the organization and revokes their playground keys. Organization keys are not affected. The organization must retain at least one owner.
Remove a member (owner/admin) DELETE
Removes a member from the organization so they lose access to it. With permissions enabled, their personal keys are revoked and the response lists them. Without permissions enabled the response is 204.