POST
/
phone_numbers
/
buy

Authorizations

Authorization
string
header
required

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

Body

application/json
phone_number
string

The phone number to buy. If null, a random phone number will be purchased.

provider
enum<string>
default:
twilio

The telephony provider.

Available options:
twilio

Response

200 - application/json
account_id
string
required

The account id associated with the phone number.

created_at
string
required

The date the phone number was created.

id
string
required

The id of the phone number.

phone_number
string
required

The phone number including the country code.

telephony
object
required

The telephony provider for the phone number.

updated_at
string
required

The date the phone number was last updated.

uri
string
required

The uri of the phone number.

inbound_agent_id
string

The agent id that will be used for inbound calls. If null, the phone number will not receive any calls.

webhooks
object[]

The webhooks of the phone number. This is used to fetch the agent at the start of the conversation.