B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

Members

/

Delete Member MFA Phone Number

Delete Member MFA phone number

The Delete Member MFA phone number method wraps the Delete Member MFA phone number API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to delete the phone numbers of Members in other Organizations.

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.

Use the Delete Self MFA Phone method when the Member is deleting their own TOTP MFA.


Method parameters


member_id*string
import { useStytchB2BClient } from '@stytch/react/b2b';

export const DeleteMemberMFAPhoneNumber = () => {
  const stytch = useStytchB2BClient();

  const deleteMemberMFAPhoneNumber = () => {
    stytch.organization.members.deleteMFAPhoneNumber('member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f');
  };

  return <button onClick={deleteMemberMFAPhoneNumber}>Delete Phone Number</button>;
};

RESPONSE

200
{
    "member": {...},
    "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
    "organization": {...}
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
    "status_code": 200
}