Purchase a Twilio or Telnyx phone number, configure webhooks automatically, and assign it to a Burki voice AI assistant.
phone_number (string, required): The phone number to purchase in E.164 formatprovider (string, required): Provider to use ("twilio" or "telnyx")assistant_id (integer, optional): ID of the assistant to assign this number tofriendly_name (string, optional): Custom display name for the number200 OK status with purchase confirmation.
success (boolean): Whether the purchase completed successfullyphone_number (string): The purchased phone numberprovider (string): Provider used for the purchase (“twilio” or “telnyx”)purchase_details (object): Provider-specific purchase information
sid (string): Twilio phone number SIDfriendly_name (string): Display namevoice_url (string): Configured voice webhook URLsms_url (string): Configured SMS webhook URLcapabilities (object): Number capabilitiesdate_created (string): Purchase timestampid (string): Telnyx order IDstatus (string): Order status (“completed”, “pending”, etc.)connection_id (string): Associated connection IDdate_created (string): Purchase timestampmessage (string): Human-readable confirmation messageprovider value (must be “twilio” or “telnyx”)assistant_id (assistant doesn’t exist)assistant_id, the system:
https://yourdomain.com/twimlhttps://yourdomain.com/twimlhttps://yourdomain.com/telnyx-webhook| Issue | Cause | Solution |
|---|---|---|
| ”Number not available” | Number purchased by someone else | Search for new numbers |
| ”Insufficient balance” | Account balance too low | Add funds to provider account |
| ”Invalid credentials” | Wrong API keys | Check provider credentials |
| ”Assistant not found” | Invalid assistant ID | Verify assistant exists |
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request model for purchasing a phone number.
Phone number to purchase in E.164 format
Provider to use ('twilio', 'telnyx', 'vonage', or 'byo-sip-trunk')
ISO-2 country code (e.g. US, GB). Auto-derived from phone number if not provided.
Assistant to assign the number to
Friendly name for the number
Telnyx messaging profile ID to assign the number to