Skip to main content
POST
/
v1
/
phone-numbers
Purchase a phone number
curl --request POST \
  --url https://api.zavu.dev/v1/phone-numbers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phoneNumber": "+15551234567",
  "name": "Primary Line"
}
'
{
  "phoneNumber": {
    "id": "<string>",
    "phoneNumber": "+15551234567",
    "capabilities": [
      "sms",
      "voice"
    ],
    "status": "active",
    "pricing": {
      "monthlyPrice": 123,
      "upfrontCost": 123,
      "monthlyCost": 123,
      "isFreeNumber": true
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "senderId": "<string>",
    "nextRenewalDate": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
phoneNumber
string
required

Phone number in E.164 format.

Example:

"+15551234567"

name
string

Optional custom name for the phone number.

Maximum string length: 100

Response

Phone number purchased successfully.

phoneNumber
object
required