This endpoint allows you to release (delete) a phone number from your Twilio or Telnyx account, making it available for others to purchase. The number is immediately removed from your account and all associated configurations are cleaned up.
How It Works
- Provider Detection: The system automatically detects which provider owns the number
- Account Removal: The number is released from your telephony provider account
- Database Cleanup: The number is removed from your organization’s inventory
- Immediate Effect: The number stops receiving calls and messages instantly
Permanent Action: Once released, a phone number cannot be recovered. The number becomes available for others to purchase and you cannot guarantee getting it back.
Request Body
The request body is a JSON object containing release details.
phone_number (string, required): The phone number to release in E.164 format
provider (string, optional): Provider to use ("twilio" or "telnyx"). Auto-detected if not provided
Auto-Detection Example
Provider Auto-Detection: If you don’t specify a provider, the system will automatically detect which provider owns the number based on your database records.
Response
A successful request returns a 200 OK status with release confirmation.
Response Fields
success (boolean): Whether the release completed successfully
phone_number (string): The released phone number
provider (string): Provider from which the number was released
message (string): Human-readable confirmation message
Error Responses
400 Bad Request
Returned when the request contains invalid data.
Common causes:
- Invalid
provider value
- Invalid phone number format
- Number not in E.164 format
404 Not Found
Returned when the phone number is not found.
This occurs when:
- Number doesn’t exist in your account
- Number was never purchased through Burki
- Number already released
500 Internal Server Error
Returned when the release fails at the provider level.
Common causes:
- Provider API error
- Network connectivity issues
- Invalid provider credentials
- Number has active calls/usage
Release Workflow
Standard Release Process
Bulk Release Process
Use Cases
Cost Optimization
Release unused numbers to reduce monthly costs:
Account Cleanup
Remove test or temporary numbers:
Geographic Reorganization
Release numbers when closing regional offices:
Provider Migration
Release numbers before switching providers:
Provider Behavior
Twilio Release
- Immediate Deactivation: Number stops working instantly
- Billing: Pro-rated refund may apply (check Twilio terms)
- Reactivation: Number returns to Twilio’s available pool
- Dependencies: All webhooks and configurations are removed
Telnyx Release
- Immediate Deactivation: Number stops working instantly
- Billing: Check Telnyx terms for refund policies
- Reactivation: Number returns to available inventory
- Order Status: Associated orders marked as released
Safety Considerations
Pre-Release Checklist
Before releasing a number, ensure:
- No Active Calls: Number isn’t currently handling calls
- No Dependencies: No critical integrations depend on this number
- Customer Communication: Customers are notified of number changes
- Documentation Updated: Internal docs reflect the change
- Backup Plan: Alternative contact methods are available
Impact Assessment
Releasing a number affects:
- Incoming Calls: All incoming calls will fail
- SMS Messages: SMS/MMS will not be delivered
- Assistant Assignment: Associated assistant becomes unreachable
- Customer Experience: Customers lose ability to contact you
Integration Examples
Node.js
Python
PHP
Batch Operations
Release Multiple Numbers
Conditional Release
Best Practices
Planning and Preparation
- Audit First: Review which numbers are actually needed
- Usage Analysis: Check call/SMS volume before releasing
- Customer Impact: Assess impact on customer communications
- Gradual Release: Release numbers in phases, not all at once
Error Handling
Cost Management
- Regular Audits: Monthly review of number usage
- Automated Cleanup: Script to release unused numbers
- Approval Process: Require approval for number releases
- Recovery Planning: Consider number porting instead of release
Documentation
Always document releases:
- Which numbers were released
- Reason for release
- Date and time
- Impact assessment
- Rollback plan (if applicable)
Troubleshooting
Common Issues
Recovery Options
If you accidentally release a critical number:
- Immediate Search: Search for the number in available pools
- Quick Purchase: Purchase it back if still available
- Alternative Numbers: Find similar numbers in the same area
- Customer Communication: Notify customers of temporary number changes
Monitoring
Set up monitoring for:
- Number release events
- Failed release attempts
- Usage patterns before release
- Customer impact metrics
Best Practice: Always test the release process with non-critical numbers first to understand the full impact and timing.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request model for releasing a phone number.
Provider ('twilio', 'telnyx', 'vonage', or 'byo-sip-trunk'). Auto-detected if not provided
Response model for phone number release.