cURL
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>" }
Creates a phone number of various types (purchase, SIP import, or Vogent SIP).
Create a new phone number
The type of phone number creation operation.
purchase
sip_import
vogent_sip
Required when type is 'purchase'.
Show child attributes
Required when type is 'sip_import'.
Required when type is 'vogent_sip'.
Successful operation
The number in e.164 format, or the SIP username, if the type is SIP_USERNAME.
"+18001234567"
PSTN
SIP_USERNAME
The ID of the linked agent, if the phone number is linked to one.