Reset user password
POST
/api/v1/users/{id}/reset-password
const url = 'http://localhost:3000/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reset-password';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"password":"example","sendEmail":true,"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reset-password \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "password": "example", "sendEmail": true, "reason": "example" }'Resets a user password. If no password provided, generates a random one. Requires Super Admin privileges.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
User UUID
Request Body required
Section titled “Request Body required ” Media type application/json
object
password
New password (if not provided, a random password will be generated)
string
sendEmail
required
Send reset email notification to user
boolean
reason
Reason for resetting the password
string
Responses
Section titled “ Responses ”Password reset successfully
Media type application/json
object
success
required
Whether the password reset itself succeeded
boolean
temporaryPassword
Temporary password (only included if generated)
string
mustChangePassword
required
User must change password on next login
boolean
emailSent
Whether a reset email was actually sent. False when the user has no linked Keycloak account, Keycloak sync is disabled, or the send failed (FM-602 S2).
boolean
emailError
Why the email was not sent, when emailSent is false (e.g. ‘no-keycloak-account’, ‘keycloak-sync-disabled’, ‘keycloak-send-failed’).
string
Example generated
{ "success": true, "temporaryPassword": "example", "mustChangePassword": true, "emailSent": true, "emailError": "example"}Unauthorized
Forbidden - Super Admin required
User not found