class StytchB2B::Passwords::Email

def reset_start(

The type of this field is +Integer+.
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.
status_code::
The type of this field is +String+.
Globally unique UUID that identifies a member's email
member_email_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Member.
member_id::
The type of this field is +String+.
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.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable +String+.
Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic Links - Reset Password.
reset_password_template_id::
The type of this field is nilable +ResetStartRequestLocale+ (string enum).

Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!

Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.

Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
locale::
The type of this field is nilable +String+.
you have not set a default `login_redirect_url` and magic links are not enabled for the member, an error is returned.
default `login_redirect_url` that you set in your Dashboard is used. This value is only used if magic links are enabled for the member. If
that verifies the request by querying Stytch's authenticate endpoint and finishes the magic link flow. If this value is not passed, the
The URL that the member clicks from the reset without password link. This URL should be an endpoint in the backend server
login_redirect_url::
The type of this field is nilable +String+.
A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
code_challenge::
The type of this field is nilable +Integer+.
Sets a time limit after which the email link to reset the member's password will no longer be valid.
reset_password_expiration_minutes::
The type of this field is nilable +String+.
If you have not set a default `reset_password_redirect_url`, an error is returned.
Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used.
The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying
reset_password_redirect_url::
The type of this field is +String+.
The email address of the Member to start the email reset process for.
email_address::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

You may update your password strength configuration in the [stytch dashboard](https://stytch.com/dashboard/password-strength-config).
considered valid if they meet the requirements that you've set with Stytch.
if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are
If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid
This endpoint adapts to your Project's password strength configuration.

Initiates a password reset for the email address provided. This will trigger an email to be sent to the address, containing a magic link that will allow them to set a new password and authenticate.
def reset_start(
  organization_id:,
  email_address:,
  reset_password_redirect_url: nil,
  reset_password_expiration_minutes: nil,
  code_challenge: nil,
  login_redirect_url: nil,
  locale: nil,
  reset_password_template_id: nil
)
  request = {
    organization_id: organization_id,
    email_address: email_address
  }
  request[:reset_password_redirect_url] = reset_password_redirect_url unless reset_password_redirect_url.nil?
  request[:reset_password_expiration_minutes] = reset_password_expiration_minutes unless reset_password_expiration_minutes.nil?
  request[:code_challenge] = code_challenge unless code_challenge.nil?
  request[:login_redirect_url] = login_redirect_url unless login_redirect_url.nil?
  request[:locale] = locale unless locale.nil?
  request[:reset_password_template_id] = reset_password_template_id unless reset_password_template_id.nil?
  post_request('/v1/b2b/passwords/email/reset/start', request)
end