Delete Phone Number
Delete a phone number and clean up external resources (Twilio trunk configuration).
HTTP Request
URL Parameters
Example Request
Response (Success)
Response (Corrupted - Cleanup Failed)
Cleanup Process
When deleting a phone number:
- Status Update: Phone number is marked as “deleting”
- Twilio Cleanup (if configured):
- Deletes SIP trunk
- Removes credential lists
- Removes connection policies
- Database Deletion: Phone number record is deleted
Failure Handling
If Twilio cleanup fails:
- Phone number is marked as “corrupted”
- Phone number record is kept in database
- Error message includes cleanup instructions
- Use Force Delete to remove corrupted phone numbers
Common Error Scenarios
Invalid Twilio Credentials
If Twilio credentials are invalid or expired during deletion:
Resolution:
- Manually clean up Twilio trunk in Twilio console
- Use Force Delete to remove the phone number record
Network Errors
If network issues prevent communication with Twilio:
Resolution:
- Wait for network connectivity to restore
- Retry deletion (system will attempt cleanup again)
- If issues persist, manually clean up and use Force Delete
Important Notes
- Agent unlinking: Phone numbers are automatically unlinked from agents before deletion
- Permanent action: Deletion cannot be undone
- External cleanup: Twilio resources are removed to prevent orphaned configurations
- Corrupted state: Failed cleanup results in corrupted state requiring manual intervention
See Also
- Force Delete Phone Number - Force delete corrupted phone numbers
- Phone Numbers Overview - Learn about phone number management
