---
title: "Update a member"
method: PATCH
path: "/members/{userId}"
tags: ["Members"]
---

# Update a member

`PATCH /members/{userId}`

## Request

- Base URL: `https://api.cavuno.com/v1`
- URL: `https://api.cavuno.com/v1/members/{userId}`
- Auth: HTTP bearer

Updates a member's role. The primary owner's role cannot be changed here (use transfer-ownership), and only an owner may promote a member to owner.

## Path parameters

- `userId` string, required: The user ID of the member.

## Request body

- UpdateMemberBody
  - `role` 'owner' | 'admin' | 'member', required: The new role. Only an owner may set `owner`; the primary owner’s role is immutable (use transfer-ownership).

## Response `200`

Successful response.

- Member
  - `id` string, required: Unique identifier for the membership.
  - `object` 'member', required: String representing the object's type.
  - `userId` string, required: Identifier of the user behind the member.
  - `email` string, required: The member's email address.
  - `name` string, required: The member's display name.
  - `avatarUrl` string, nullable, required: URL of the member's avatar, or `null` if none is set.
  - `role` string, required: The member's role in the account.
  - `suspended` boolean, required: Whether the member is currently suspended.
  - `joinedAt` string, required: ISO-8601 timestamp of when the member joined the account.
  - `isPrimaryOwner` boolean, required: Whether the member is the account primary owner.

## Other responses

- `403`: Only an owner can promote to owner.
- `404`: Member not found.
- `409`: Cannot change the primary owner role.

## Changes

- **2026-10-19** `c34152c38176`: 3 info
  - added the optional property `error/upgrade` to the response with the `403` status
  - added the optional property `error/upgrade` to the response with the `404` status
  - added the optional property `error/upgrade` to the response with the `409` status

[Operation history](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/changes/members/:userId/patch.md)

---

[API](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api.md) · [All operations](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/revisions/d5974dabff14?raw)
