from dari import Dariclient = Dari(api_key="YOUR_API_KEY")phone_number = client.purchase_phone_number(label="Support Line")print(f"Purchased phone number: {phone_number['phone_e164']}")
Copy
{ "id": "phone-uuid", "phone_e164": "+18782511407", "label": "My Support Line", "active": true, "created_at": "2025-11-09T22:39:45.689803", "updated_at": "2025-11-09T22:39:45.689804"}
Phone Numbers
Purchase Phone Number
Purchase a new Twilio phone number for your workspace
POST
https://api.usedari.com
/
public
/
phone-numbers
Copy
from dari import Dariclient = Dari(api_key="YOUR_API_KEY")phone_number = client.purchase_phone_number(label="Support Line")print(f"Purchased phone number: {phone_number['phone_e164']}")
Copy
{ "id": "phone-uuid", "phone_e164": "+18782511407", "label": "My Support Line", "active": true, "created_at": "2025-11-09T22:39:45.689803", "updated_at": "2025-11-09T22:39:45.689804"}
This endpoint allows you to purchase a new Twilio phone number that can be used for SMS-based two-factor authentication. The phone number is automatically configured with SMS webhooks for receiving 2FA codes.