Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceAccount and accessOrganizations

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>
PATCH
/v1/orgs/{orgId}/members/{userId}

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string
userId*string

Request Body

application/json
  1. body

Send role or roleId.

role?string

A built-in role. billing and inference need permissions enabled. Only an owner grants owner.

Value in"owner""admin""member""viewer""billing""inference"
roleId?string

A custom role's id (role_...), for an organization with permissions enabled.

Response Body

Updated

application/json
  1. response
userId*string
role*string
roleName?string

The role's display name (permissions enabled only).

email?string
fullName?string
avatarUrl?string
invitedAt?string
joinedAt?string
status?string

Set 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.

Value in"active""invited"
Example Request
curl -X PATCH 'https://api.openrelay.inc/v1/orgs/string/members/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "userId": "string",  "role": "string",  "roleName": "string",  "email": "string",  "fullName": "string",  "avatarUrl": "string",  "invitedAt": "string",  "joinedAt": "string",  "status": "active"}