https://retellai.com/?utm_source=discord&utm_medium=seo logo
Internal server error when trying to remove a phon...
# ❓・ai-evy-support
c
@AI Evy Internal server error when trying to remove a phone number
a
Thanks for tagging me @crcdlx. I'll look through relevant sources and get back to you shortly.
### Answer I don't have specific information about removing phone numbers in the available sources. The sources cover call disconnection debugging [(1) ]() , call creation [(2) ]() , call registration [(3) ]() , outbound connection issues [(4) ]() , and call deletion [(5) ]() . There are some Discord discussions about internal server errors with other API endpoints [(6) ]() [(7) ]() [(8) ]() , but none specifically address phone number removal. For troubleshooting internal server errors when removing phone numbers, I'd recommend: Check out these potentially useful sources: [Debug call disconnection]() , [Debug outbound connection issues]() Would you like me to provide a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[4] Debug outbound connection issues](https://docs.retellai.com/reliability/debug-outbound-call) [[5] Delete Call](https://docs.retellai.com/api-references/delete-call) [[6] [500] internal server error: error from voice backend: {\"status\":\"error\",\"message\":\"Internal](https://discord.com/channels/1186424376300679209/1395437135443792133) [[7] Getting internal server error when trying to create voice based test simulation](https://discord.com/channels/1186424376300679209/1382361188440215812) [[8] internal server error on create knowledge base by API](https://discord.com/channels/1186424376300679209/1391417148215136376) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
Internal server error when trying to delete a phone number
@AI Evy Internal server error when trying to delete a phone number
a
Thanks for the follow-up, @crcdlx. I'll get back to you soon.
### Answer For deleting a phone number, you should use the Delete Phone Number API endpoint [(1) ]() . The correct implementation is:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
await client.phoneNumber.delete('+14157774444') ;
The API uses a DELETE request to
/delete-phone-number/{phone_number}
where the phone number must be in E.164 format . If you're experiencing internal server errors, this could be related to TTS provider issues as mentioned in the Discord discussions [(2) ]() . According to one support response, if the voice you select goes down, Retell switches to a fallback voice, and if the fallback also fails, the system returns a 500 Internal Server Error . For troubleshooting internal server errors: - Check the Retell Status page for any TTS provider outages - Ensure your API key is correctly formatted as "Bearer YOUR_API_KEY" [(1) ]() - Verify the phone number is in the correct E.164 format If the issue persists, you can contact support: - Visit [Contact Sales]() - Visit [) Would you like me to provide a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Delete Phone Number](https://docs.retellai.com/api-references/delete-phone-number) [[2] [500] internal server error: error from voice backend: {\"status\":\"error\",\"message\":\"Internal](https://discord.com/channels/1186424376300679209/1395437135443792133) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.