Purchase a phone number

Purchase an available phone number. Requires a paid plan: the Free plan cannot purchase phone numbers and receives 402 with code paid_plan_required. Paid plans include one US number at no charge. The included number is one per account and is granted once: claiming it spends the benefit for good, so releasing that number does not make another one free, and numbers the account already bought do not consume it.

post/v1/phone-numbers

Request body

phoneNumberstring required

Phone number in E.164 format.

namestring

Optional custom name for the phone number.

Example request

{
  "phoneNumber": "+15551234567"
}

Response

Phone number purchased successfully.

Example response

{
  "phoneNumber": {
    "phoneNumber": "+15551234567",
    "capabilities": [
      "sms",
      "voice"
    ]
  }
}