Headers
Your API key for authentication
Request Body
A descriptive label for this phone number (e.g., “Support Line”, “Main 2FA Number”)
Response Fields
The unique identifier of the purchased phone number
The phone number in E.164 format (e.g., “+18782511407”)
The descriptive label for this phone number
Whether this phone number is active (always true for newly purchased numbers)
ISO 8601 timestamp of when the phone number was purchased
ISO 8601 timestamp of when the phone number was last updated
Features
- Real Purchase: Actually purchases a real Twilio phone number (mobile or local US)
- Auto-Configuration: Automatically configures SMS webhooks for receiving 2FA codes
- Immediate Use: Phone number is stored with active=True and ready for use immediately
- Workspace Limits: Enforces workspace limits based on max_phone_numbers setting
Usage Notes
- API Key: Get your API key from the Dari dashboard in workspace settings
- Workspace Limits: Your workspace has a maximum number of phone numbers it can purchase
- Enable Feature: Phone 2FA must be enabled for your workspace (max_phone_numbers > 0)
- US Numbers: Currently only purchases US phone numbers (mobile or local)
- Costs: Phone number purchases incur Twilio costs that are billed to your workspace
Error Responses
What Happens When You Purchase?
- Number Selection: System searches for available mobile or local US numbers
- Twilio Purchase: Number is purchased through your workspace’s Twilio account
- Webhook Setup: SMS webhooks are automatically configured to receive 2FA codes
- Database Storage: Number is saved to your workspace with active=True
- Ready to Use: Number can immediately be used for SMS-based 2FA in credentials