curl -X PATCH "https://api.hitler.app/api/users/user-uuid-123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "manager"
}'
{
"id": "user-uuid-123",
"email": "john@acme.com",
"name": "John Doe",
"role": "manager",
"isActive": true,
"organizationId": "org-uuid",
"createdAt": "2024-01-10T15:30:00.000Z",
"updatedAt": "2024-01-15T14:00:00.000Z"
}
Users
Update User
Update user details
PATCH
/
api
/
users
/
{id}
curl -X PATCH "https://api.hitler.app/api/users/user-uuid-123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "manager"
}'
{
"id": "user-uuid-123",
"email": "john@acme.com",
"name": "John Doe",
"role": "manager",
"isActive": true,
"organizationId": "org-uuid",
"createdAt": "2024-01-10T15:30:00.000Z",
"updatedAt": "2024-01-15T14:00:00.000Z"
}
This endpoint requires Admin role to change roles. Users can update their own non-role fields via
/api/users/me.Path Parameters
string
required
User UUID
Request
string
New display name
string
New role:
employee, manager, admin (Admin only)object
User preferences
Response
Returns the updated user.curl -X PATCH "https://api.hitler.app/api/users/user-uuid-123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "manager"
}'
{
"id": "user-uuid-123",
"email": "john@acme.com",
"name": "John Doe",
"role": "manager",
"isActive": true,
"organizationId": "org-uuid",
"createdAt": "2024-01-10T15:30:00.000Z",
"updatedAt": "2024-01-15T14:00:00.000Z"
}