Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The account for which the phone number should be created.
"acct_01j9a43avnfqzbjfch6pygv1td"
Body
Parameters for purchasing a new phone number. The system will automatically infer the type in certain cases:
- If only area_code is provided, type is inferred from the area code
- If only latitude/longitude are provided, type is inferred as 'local'
- Otherwise, type must be explicitly specified
The desired area code for this phone number. If provided without type, the type will be inferred.
"801"
Latitude to search for nearby phone numbers. Must be used with longitude. If provided without type, type will be inferred as 'local'.
-90 <= x <= 90
40.7128
Longitude to search for nearby phone numbers. Must be used with latitude. If provided without type, type will be inferred as 'local'.
-180 <= x <= 180
-74.006
Whether the phone number is local or toll-free. Can be omitted if area_code or latitude/longitude are provided.
local
, toll_free
"local"
Response
Purchased phone number
A phone number that can be used to send and receive messages and calls
Unique identifier for the phone number
The phone number in E.164 format
"+18015551234"
Whether the phone number is local, toll-free, or short code
local
, toll_free