Docs

deletePhoneNumber()

Deletes a PhoneNumber.

function deletePhoneNumber(phoneNumberId: string): Promise<PhoneNumber>
  • Name
    phoneNumberId
    Type
    string
    Description

    The ID of the phone number to delete.

const phoneNumberId = 'idn_123'

const response = await clerkClient.phoneNumbers.deletePhoneNumber(phoneNumberId)

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

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint DELETE/phone_numbers/{phone_number_id}. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on