Skip to main content

Set a password

POST 

/v2beta/users/:userId/password

Add, update or reset a user's password with either a verification code or the current password.

Request​

Path Parameters

    userId stringrequired

    unique identifier of the user.

Body

required

    newPassword

    object

    Provide the new password (in plain text or as hash).

    password stringrequired

    Possible values: non-empty and <= 200 characters

    Provide the plain text password. ZITADEL will take care to store it in a secure way (hash).

    hash stringrequired

    Possible values: non-empty and <= 200 characters

    Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets.

    changeRequired boolean

    Provide if the user needs to change the password on the next use.

    currentPassword stringrequired

    Possible values: non-empty and <= 200 characters

    Provide the current password to verify you're allowed to change the password.

    verificationCode stringrequired

    Possible values: non-empty and <= 20 characters

    Or provider the verification code generated during password reset request.

Responses​

Password successfully set

Schema

    details

    object

    sequence uint64

    on read: the sequence of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    changeDate date-time

    on read: the timestamp of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    resourceOwner resource_owner is the organization or instance_id an object belongs to (string)
Loading...