Force Delete Phone Number
Force delete a corrupted phone number that failed normal deletion. This bypasses external resource cleanup.
HTTP Request
URL Parameters
Example Request
Response (Success)
Response (Not Corrupted)
Response (Error)
Validation Rules
- Only phone numbers with status “corrupted” can be force deleted
- Normal phone numbers must use regular delete endpoint
When to Use Force Delete
Use force delete when:
- Normal deletion failed: Phone number is marked as “corrupted”
- Twilio cleanup failed: External resources couldn’t be cleaned up automatically
- Manual cleanup completed: You’ve manually cleaned up Twilio resources
- Database cleanup needed: You want to remove the database record
Before Force Deleting
Step 1: Identify Corrupted Resources
When a phone number becomes corrupted, note the external resources that need cleanup:
- Twilio SIP Trunk SID (from phone number details)
- Twilio Credential Lists
- Twilio Connection Policies
- LiveKit Trunk ID
- LiveKit Dispatch Rule ID
Step 2: Manual Cleanup in Twilio
- Log into Twilio Console
- Navigate to Elastic SIP Trunking > Trunks
- Find and delete the SIP trunk (use the Trunk SID from step 1)
- Navigate to Elastic SIP Trunking > Credential Lists
- Delete any credential lists associated with the phone number
- Navigate to Elastic SIP Trunking > IP Access Control Lists
- Delete any connection policies for the phone number
Step 3: Force Delete
Once manual cleanup is complete, use the force delete endpoint to remove the database record.
Important Warnings
- No automatic cleanup: Force delete bypasses all external resource cleanup
- Manual cleanup required: You must manually clean up Twilio resources before force deleting
- Permanent action: Cannot be undone
- Orphaned resources: If you don’t manually clean up, resources may remain in Twilio (incurring costs)
Example Workflow
See Also
- Delete Phone Number - Normal deletion process
- Phone Numbers Overview - Phone number management overview
- Twilio SIP Trunking Docs - Twilio cleanup reference
