Adds an existing password to a User’s email that doesn’t have a password yet.
bcrypt, scrypt, argon2, MD-5, SHA-1, SHA-512, or PBKDF2.
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Request type
The email address of the end user.
The password hash. For a Scrypt or PBKDF2 hash, the hash needs to be a base64 encoded string.
The password hash used. Currently bcrypt, scrypt, argon_2i, argon_2id, md_5, sha_1, sha_512, and pbkdf_2 are supported.
bcrypt, md_5, argon_2i, argon_2id, sha_1, sha_512, scrypt, phpass, pbkdf_2 Optional parameters for MD-5 hash types.
Required parameters if the argon2 hex form, as opposed to the encoded form, is supplied.
Optional parameters for SHA-1 hash types.
Optional parameters for SHA-512 hash types.
Required parameters if the scrypt is not provided in a PHC encoded form.
Required additional parameters for PBKDF2 hash keys.
Whether to set the user's email as verified. This is a dangerous field, incorrect use may lead to users getting erroneously deduplicated into one User object. This flag should only be set if you can attest that the user owns the email address in question.
The name of the user. Each field in the name object is optional.
The phone number of the user. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX).
Whether to set the user's phone number as verified. This is a dangerous field, this flag should only be set if you can attest that the user owns the phone number in question.
If a new user is created, this will set an identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, ., _, -, or | characters with a maximum length of 128 characters.
Roles to explicitly assign to this User. See the RBAC guide for more information about role assignment.
Successful response
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
The unique ID of the affected User.
The unique ID of a specific email address.
In login_or_create endpoints, this field indicates whether or not a User was just created.
The user object affected by this API call. See the Get user endpoint for complete response field details.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.