> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Password setting flows

> Create a Member's password via password reset flows.

export const member = "Represents an individual end user's account within a given Organization, uniquely identified within that Organization by their email address.";

## Creating passwords for Members

A <Tooltip tip={member}>Member</Tooltip> must exist already before you call any of these endpoints. You cannot simultaneously create a Member and a password. Once you've created a Member, you can set their password a few ways:

### Using email

1. Call [Reset password via email start](/api-reference/b2b/api/passwords/create-or-reset-options/password-reset-by-email-start) to send a magic link to create a new password
2. Call [Reset password via email](/api-reference/b2b/api/passwords/create-or-reset-options/password-reset-by-email) to accept the password and token

<Note>
  A successful password reset by email will revoke all active sessions for the Member.
</Note>

### Using a session

1. Call [Reset password via session](/api-reference/b2b/api/passwords/create-or-reset-options/password-reset-by-session) using an existing session

<Note>
  The Member must have an active session to use this endpoint.
</Note>

### Using discovery email with Cross-Organization passwords

If you are using [Cross-Organization passwords](/multi-tenant-auth/authentication/passwords/cross-org), you can create a password via discovery email

1. Call [Discovery reset password via email start](/api-reference/b2b/api/passwords/create-or-reset-options/discovery-password-reset-by-email-start) to send a magic link to create a new password
2. Call [Discovery reset password via email](/api-reference/b2b/api/passwords/create-or-reset-options/discovery-password-reset-by-email) to accept the password and token

<Note>
  A successful password reset by email will revoke all active sessions for the Member.
</Note>

## Password reset email behavior

Password reset emails differ slightly depending on whether a password already exists for a Member:

* If a password does not exist, the "Verify Email" email template will be used by default.
  * For [custom email templates](/resources/branding/custom-email-templates), you can specify the custom template to use with `verify_email_template_id` when calling the [Password Reset APIs](/api-reference/b2b/api/passwords/create-or-reset-options/password-reset-by-email-start).
  * If you're managing custom email templates via the [PWA API](/api-reference/pwa/api/v3/email-templates/email-template-object), use the template type `VERIFY_EMAIL_PASSWORD_RESET`.
* If a password does exist, the "Password reset" email template will be used by default.
  * For [custom email templates](/resources/branding/custom-email-templates), you can specify the custom template to use with `reset_password_template_id` when calling the [Password Reset APIs](/api-reference/b2b/api/passwords/create-or-reset-options/password-reset-by-email-start).
  * If you're managing custom email templates via the [PWA API](/api-reference/pwa/api/v3/email-templates/email-template-object), use the template type `RESET_PASSWORD`.
