# Update a project member's role **PATCH /api/v1/projects/{id}/members/{userId}** Changes the project role for an active member identified by hex user _id. ## Servers - https://agentengine.mongodb.com: https://agentengine.mongodb.com () ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **id** (string) Project ID (hex ObjectID) - **userId** (string) User ID (hex ObjectID) ### Body: application/json (object) New role - **role** (string) New project-level role ## Responses ### 406 Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence. #### Body: application/json (object) - **badRequestDetail** (object) Optional validation details defined by the standard error schema; API negotiation errors do not emit this field. - **detail** (string) Human-readable error details. - **error** (integer) HTTP status code. - **errorCode** (string) Machine-readable error code. - **parameters** (array[string]) Request parameter names associated with the error; omitted when none apply. - **reason** (string) HTTP status reason phrase. ### 200 OK #### Body: application/json (object) - **created_at** (string) - **email** (string) Resolved for display only. - **name** (string) Display name; empty when the user record has none. - **org_id** (string) The project's parent org (hex). - **roles** (array[object]) Effective project roles (direct + inherited). - **updated_at** (string) - **user_id** (string) Stable user _id (hex). ### 400 Bad Request #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 404 Not Found #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 500 Internal Server Error #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) [Powered by Bump.sh](https://bump.sh)