This endpoint allows you to retrieve a list of all phone numbers that have been purchased for your workspace. These phone numbers can be used for SMS-based two-factor authentication.
Your API key for authentication
Response Fields
The unique identifier of the phone number
The phone number in E.164 format (e.g., “+18782511407”)
A descriptive label for this phone number
Whether this phone number is active and ready for use
ISO 8601 timestamp of when the phone number was purchased
ISO 8601 timestamp of when the phone number was last updated
from dari import Dari
client = Dari( api_key = "YOUR_API_KEY" )
phone_numbers = client.list_phone_numbers()
print ( f "Found { len (phone_numbers) } phone numbers" )
for phone in phone_numbers:
print ( f "- { phone[ 'label' ] } : { phone[ 'phone_e164' ] } " )
[
{
"id" : "phone-uuid" ,
"phone_e164" : "+18782511407" ,
"label" : "Support Line" ,
"active" : true ,
"created_at" : "2025-11-09T22:39:45.689803" ,
"updated_at" : "2025-11-09T22:39:45.689804"
}
]
Usage Notes
API Key : Get your API key from the Dari dashboard in workspace settings
Workspace Scoped : Only returns phone numbers for your workspace
SMS 2FA : Phone numbers are configured to receive SMS messages for two-factor authentication
Active Status : Only active phone numbers can receive SMS messages
Error Responses
{
"detail" : "Invalid API key"
}
500 Internal Server Error
{
"detail" : "Failed to retrieve phone numbers"
}