POST
/
buy-phone-number
curl --request POST \
  --url https://api.daily.co/v1/buy-phone-number \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "number": "+18058700061"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "number": "+18058700061"
}

This will buy a phone number. In the POST request you can either provide the phone number you want to buy, or leave it empty. If the specified number is still available, it will be bought or the API will return a failure. Alternatively, if you skipped the number field, a random phone number from California (CA) will be bought.

You can check or find available numbers using the /list-available-numbers API.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Phone number to purchase. If empty, a random number from CA will be chosen.
number
string

The phone number to purchase. Example: '+18058700061'.

Response

200 - application/json
Successful purchase of the phone number.
id
string

A UUID that uniquely identifies this phone number.

number
string

The purchased phone number.