Update an existing user’s information.
Authentication
Requires a valid JWT token in the Authorization header:
Authorization: Bearer {token}
Authorization
You can only update users with a role level lower than your own, except:
- Admins (roleId 1) can update other Admins
Path Parameters
The user’s unique identifier (UUID).
Request Body
All fields are optional. Only include the fields you want to update.
User’s name. Maximum 50 characters.
User’s email address. Must be a valid email format and not exceed 100 characters. Must be unique.
User’s new password. Must be between 8 and 255 characters.
Response
The user’s unique identifier (UUID).
The updated user’s email address.
curl -X PUT https://api.arca.example.com/users/123e4567-e89b-12d3-a456-426614174000 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"nome": "John Updated",
"email": "[email protected]"
}'
{
"id_User": "123e4567-e89b-12d3-a456-426614174000",
"nome": "John Updated",
"email": "[email protected]",
"roleId": 2
}