Skip to main content
PUT
Edit user
Requires an active session with the admin role. Only active accounts that are not admin can be edited; otherwise it returns 403.

Path parameters

string
required
Current email address of the user to edit.

Request body

At least one of the two fields is mandatory, and both must be text. Any other field returns 400.
string
New email address. If another user already uses it, it returns 409.
string
New role. It cannot be admin.

Email change

Changing the email generates a new password and sends it to the new email; the old one stops working. The email is sent before the change is saved: if it cannot be sent, it returns 502 and the user keeps their email and password. If only the role changes, no email is sent.

Response

boolean
true if the update succeeded.
string
Confirmation or error message.