To delete an imported phone number in Retell AI, you can use the Delete Phone Number API endpoint(1).
Using JavaScript:
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
});
await client.phoneNumber.delete('+14157774444');
Using Python:
client.phone_number.delete(phone_number)
The endpoint is DELETE /delete-phone-number/{phone_number}, where {phone_number} is the E.164 format of the number (country code followed by the number with no spaces or special characters, e.g., “+14157774444”)(1).
You can also delete numbers through the dashboard(3).
Note: There have been reports of this endpoint timing out for imported phone numbers(4). If you encounter issues, you may need to contact support through Discord or the support channels(3)(5).