Authentication
This endpoint requires admin authentication and the users:write permission.
Path Parameters
Request Body
Username (1-255 characters, trimmed)
Email address (trimmed, must be valid email)
New password (minimum 8 characters)
Full name (max 511 characters, trimmed). Will be split into first and last name.
First name (max 255 characters, trimmed)
Last name (max 255 characters, trimmed)
Language code (max 10 characters, trimmed)
Whether user has root admin privileges
Response
curl -X PATCH "https://panel.example.com/api/admin/users/user-uuid" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"email": "[email protected]"
}'
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"username": "john.doe",
"email": "[email protected]",
"name": "John Doe",
"role": "admin",
"createdAt": "2024-01-15T10:30:00Z"
}
}
Special Behaviors
Email Change
- Email verification status is reset to
null when email is changed
- User will need to verify their new email address
Password Change
- Password is hashed and stored securely
passwordResetRequired flag is automatically set to false
- User can immediately log in with the new password
Name Handling
- If
name is provided without nameFirst/nameLast, it’s automatically split
- First word becomes
nameFirst, remaining words become nameLast
- You can also provide
nameFirst and nameLast directly for more control
Role Change
- Role changes are applied through the auth system
- Both
role and rootAdmin fields are updated in the database
Notes
- Only provided fields are updated
- All updates set the
updatedAt timestamp
- Maximum request body size is 16 KB (SMALL size limit)