Update a Member using the Stytch B2B API.
organization_id and member_id.
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
A Stytch session that can be used to run the request with the given member's permissions.
A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions.
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. You may also use the organization_slug or organization_external_id here as a convenience.
Globally unique UUID that identifies a specific Member. The member_id is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member.
Request type
The name of the Member.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.info.name action on the stytch.member Resource. Alternatively, if the Member Session matches the Member associated with the member_id passed in the request, the authorization check will also allow a Member Session that has permission to perform the update.info.name action on the stytch.self Resource.
An arbitrary JSON object for storing application-specific data or identity-provider-specific data. If a session header is passed into the request, this field may not be passed into the request. You cannot update trusted metadata when acting as a Member.
An arbitrary JSON object of application-specific data. These fields can be edited directly by the frontend SDK, and should not be used to store critical information. See the Metadata resource for complete field behavior details.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.info.untrusted-metadata action on the stytch.member Resource. Alternatively, if the Member Session matches the Member associated with the member_id passed in the request, the authorization check will also allow a Member Session that has permission to perform the update.info.untrusted-metadata action on the stytch.self Resource.
Identifies the Member as a break glass user - someone who has permissions to authenticate into an Organization by bypassing the Organization's settings. A break glass account is typically used for emergency purposes to gain access outside of normal authentication procedures. Refer to the Organization object and its auth_methods and allowed_auth_methods fields for more details.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.settings.is-breakglass action on the stytch.member Resource.
Sets the Member's phone number. Throws an error if the Member already has a phone number. To change the Member's phone number, use the Delete member phone number endpoint to delete the Member's existing phone number first.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.info.mfa-phone action on the stytch.member Resource. Alternatively, if the Member Session matches the Member associated with the member_id passed in the request, the authorization check will also allow a Member Session that has permission to perform the update.info.mfa-phone action on the stytch.self Resource.
Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization's MFA policy is set to REQUIRED_FOR_ALL.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.settings.mfa-enrolled action on the stytch.member Resource. Alternatively, if the Member Session matches the Member associated with the member_id passed in the request, the authorization check will also allow a Member Session that has permission to perform the update.settings.mfa-enrolled action on the stytch.self Resource.
Roles to explicitly assign to this Member. Will completely replace any existing explicitly assigned roles. See the RBAC guide for more information about role assignment.
If a Role is removed from a Member, and the Member is also implicitly assigned this Role from an SSO connection
or an SSO group, we will by default revoke any existing sessions for the Member that contain any SSO
authentication factors with the affected connection ID. You can preserve these sessions by passing in the
preserve_existing_sessions parameter with a value of true.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.settings.roles action on the stytch.member Resource.
Whether to preserve existing sessions when explicit Roles that are revoked are also implicitly assigned
by SSO connection or SSO group. Defaults to false - that is, existing Member Sessions that contain SSO
authentication factors with the affected SSO connection IDs will be revoked.
The Member's default MFA method. This value is used to determine which secondary MFA method to use in the case of multiple methods registered for a Member. The current possible values are sms_otp and totp.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.settings.default-mfa-method action on the stytch.member Resource. Alternatively, if the Member Session matches the Member associated with the member_id passed in the request, the authorization check will also allow a Member Session that has permission to perform the update.settings.default-mfa-method action on the stytch.self Resource.
Updates the Member's email_address, if provided. This will clear any existing passwords and require re-verification of the new email address.
If a Member's email address is changed, other Members in the same Organization cannot use the old email address, although the Member may update back to their old email address.
A Member's email address can only be useable again by other Members if the Member is deleted.
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the update.info.email action on the stytch.member Resource. Members cannot update their own email address.
An identifier that can be used in most API calls where a member_id is expected. This is a string consisting of alphanumeric, ., _, -, or | characters with a maximum length of 128 characters. External IDs must be unique within an organization, but may be reused across different organizations in the same project.
If unlink_email is true and an email_address is provided, the Member's previous email will be deleted instead of retired. Defaults to false.
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.
Globally unique UUID that identifies a specific Member.
The Member object
The Organization object.
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.