Skip to main content
POST
/
phone_numbers
/
purchase
Purchase available number (deprecated, use /phone_numbers instead)
curl --request POST \
  --url https://api.vogent.ai/api/phone_numbers/purchase \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "number": "<string>"
}'
{
  "id": "<string>",
  "number": "+18001234567",
  "type": "PSTN",
  "agentId": "<string>"
}

Authorizations

Authorization
string
header
required

In the form Bearer <api_key_here>. You can find your api key in your dashboard.

Body

application/json
number
string
required

The number as returned by the phone number search endpoint.

Response

Successful operation

id
string
required
number
string
required

The number in e.164 format, or the SIP username, if the type is SIP_USERNAME.

Example:

"+18001234567"

type
enum<string>
required
Available options:
PSTN,
SIP_USERNAME
agentId
string | null
required

The ID of the linked agent, if the phone number is linked to one.

I