The Delete Self MFA phone number method wraps the Delete Member MFA phone number API endpoint. The organization_id and member_id will be automatically inferred from the logged-in Member's session. This method can only be used to delete the logged-in Member's MFA phone number.
To change a Member's phone number, you must first call this endpoint to delete the existing phone number.
Existing Member Sessions that include a phone number authentication factor will not be revoked if the phone number is deleted, and MFA will not be enforced until the Member logs in again. If you wish to enforce MFA immediately after a phone number is deleted, you can do so by prompting the Member to enter a new phone number and calling the SMS OTP send endpoint, then calling the SMS Authenticate endpoint.
You can listen for successful Member updates anywhere in the codebase with the stytch.organization.onMemberChange() method or useStytchMember hook if you are using React.