# Update project member

```http
PATCH /projects/{project_reference}/members/{user_id}
```

Changes a non-owner member's role to admin, editor or viewer; the owner changes only through updateProjectOwner. Requires project.members.manage.

## Parameters

| Name                | In   | Required | Description                                                |
| ------------------- | ---- | -------- | ---------------------------------------------------------- |
| `project_reference` | path | Yes      | Project slug, UUID, or domain that identifies the project. |
| `user_id`           | path | Yes      | User ID of the project member.                             |

## Request body

| Field  | Type   | Required | Description                                                                 |
| ------ | ------ | -------- | --------------------------------------------------------------------------- |
| `role` | string | Yes      | New role: admin, editor or viewer. Owner promotion uses updateProjectOwner. |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 200    | The member with the new role                                                                                |
| 400    | Invalid user ID or role, or the member is the current owner; use updateProjectOwner                         |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden - insufficient permissions, or the project is system-managed                                      |
| 404    | Project or member not found                                                                                 |
| 413    | Payload too large                                                                                           |
| 500    | Server error                                                                                                |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
