Docs

deleteEmailAddress()

Deletes an EmailAddress for a given ID.

function deleteEmailAddress: (emailAddressId: string) => Promise<EmailAddress>;
  • Name
    emailAddressId
    Type
    string
    Description

    The ID of the email address to delete.

const emailAddressId = 'idn_2bxnrjq6IbzcU4iOR5i13v29VPK';

const response = await clerkClient.emailAddresses.deleteEmailAddress(emailAddressId);

console.log(response);
/*
_DeletedObject {
  object: 'email_address',
  id: 'idn_2bxnrjq6IbzcU4iOR5i13v29VPK',
  slug: null,
  deleted: true
}
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint DELETE/email_addresses/{email_address_id}. See the BAPI reference for more details.

Feedback

What did you think of this content?