Reset password for a user in this organization
const url = 'http://localhost:3000/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reset-password';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"delivery":"email","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/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reset-password \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "delivery": "email", "password": "example", "sendEmail": true, "reason": "example" }'Triggers a password reset for a user that is a member of this organization. Allowed for tenant admins (USERS_WRITE) and superadmins. Refuses self-reset (use the profile security page instead) and reset for inactive users.
delivery: 'email' (the default) is NON-DESTRUCTIVE: the existing password keeps working and the user receives a Keycloak UPDATE_PASSWORD email carrying the reset form — only the user sets the new password. Delivery preconditions are checked before anything is mutated, so a 409 no-delivery-channel means nothing was changed.
delivery: 'display' is the documented no-SMTP / air-gap recovery path only: it rotates the credential and returns temporaryPassword exactly once.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Organization UUID
User UUID
Request Body required
Section titled “Request Body required ”object
How the reset reaches the user (FM-862). ‘email’ (the default) is non-destructive: the existing password keeps working and the user sets a new one from the emailed reset form. ‘display’ is the no-SMTP / air-gap recovery path only: it rotates the credential and returns the generated value once.
New password. Only honoured for delivery=‘display’; ignored for delivery=‘email’, where only the user may set the password. If omitted for ‘display’, a random password is generated and returned once.
DEPRECATED (FM-862): ignored. Use delivery instead — email delivery is now the default and is non-destructive.
Reason for resetting the password
Responses
Section titled “ Responses ”Password reset triggered
object
Whether the password reset itself succeeded
The delivery mode that was applied.
One-time generated password. Present ONLY for delivery=‘display’ when no explicit password was supplied. It is never stored and cannot be retrieved again — the caller must show it to the admin once. Absent for delivery=‘email’, which never rotates the credential.
User must change password on next login
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).
Why the email was not sent, when emailSent is false (e.g. ‘no-keycloak-account’, ‘keycloak-sync-disabled’, ‘keycloak-send-failed’).
Example
{ "delivery": "email"}Self-reset attempted or user is not active
Unauthorized
Forbidden — caller lacks USERS_WRITE in this org
User is not a member of this organization
No-delivery-channel — delivery=‘email’ was requested but the user has no linked Keycloak account or the realm has no SMTP server. Nothing was changed.