Update User
Update existing user details, active status, or assigned role within a project.
Endpoint
/api/v1/projects/{project_id}/users/{user_id}Method
PUT
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Unique ID of the project |
user_id | string | Yes | Unique ID of the user |
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
Authorization | Yes | Bearer access token: Bearer <access_token> |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Yes | User display name (max 50 chars) |
avatar_url | string | No | Avatar URL |
external_user_id | string | Conditional | Required if email is not provided (max 100 chars) |
email | string | Conditional | Optional if external_user_id is provided (max 100 chars) |
password | string | No | Optional new password (min 8 chars). Leave empty to keep current password. |
is_active | boolean | Yes | Active status |
role_id | string | No | Assigned role ID |
When updating optional fields like
avatar_url, external_user_id, or email, provide an empty string or null to remove the existing value. The password field will retain its current value if left empty.Required Permission
users:update
Examples
curl --request PUT \
--url https://auth.roled.id/api/v1/projects/2JUSLUee46xG6iEwG8JwPc/users/2JRtk7i2aEFKpsKTNx6YWR \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJo...' \
--header 'Content-Type: application/json' \
--data '{
"display_name": "Alice Smith",
"avatar_url": null,
"external_user_id": "921f28239dcd",
"email": "alice.smith@example.com",
"is_active": false
}'Error Codes
| Code | HTTP Status | Description |
|---|---|---|
invalid_params | 400 | Missing or invalid request params, headers, or body |
invalid_authorization_token | 401 | Missing or invalid authorization token |
insufficient_permission | 403 | Insufficient permission |
project_not_found | 404 | Project not found |
role_not_found | 404 | Role not found |
user_not_found | 404 | User not found |
user_external_id_already_used | 409 | User with the same external user ID already exists |
user_email_already_used | 409 | User with the same email already exists |
system_error | 500 | Internal server error |