Organization Members

Update a member's role in an organization

Changed on

Updates the role of a specific member within an organization. The user performing this action must be the 'owner' of the organization. The target member's role cannot be 'owner'.

patch/api/v1/org/members/role

Request

Request body

organizationIdstring required

The ID of the organization.

memberIdstring required

The user ID of the member whose role is to be updated.

role'member' | 'admin' required

The new role for the member.

Example request

{
  "organizationId": "60d0fe4f5311236168a109ca",
  "memberId": "60d0fe4f5311236168a109cb",
  "role": "admin"
}

Response

Role updated successfully.

messagestring

Example response

{
  "message": "Role updated successfully",
  "member": {
    "userId": "60d0fe4f5311236168a109cb",
    "role": "admin"
  }
}

Changes