POST
/
phone_numbers
Create a phone number
curl --request POST \
  --url https://api.vogent.ai/api/phone_numbers \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "purchase",
  "purchase": {
    "number": "<string>"
  },
  "sipImport": {
    "phoneNumber": "<string>",
    "terminationUri": "<string>",
    "username": "<string>",
    "password": "<string>"
  },
  "vogentSip": {
    "sipPrefix": "<string>",
    "username": "<string>",
    "password": "<string>"
  }
}'
{
  "id": "<string>",
  "number": "+18001234567",
  "type": "PSTN",
  "agentId": "<string>"
}

Body

application/json

Create a new phone number

type
enum<string>
required

The type of phone number creation operation.

Available options:
purchase,
sip_import,
vogent_sip
purchase
object

Required when type is 'purchase'.

sipImport
object

Required when type is 'sip_import'.

vogentSip
object

Required when type is 'vogent_sip'.

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.