Skip to content

Reset user password

POST
/api/v1/users/{id}/reset-password
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.

id
required
string format: uuid

User UUID

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
default: true
reason

Reason for resetting the password

string

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