POST
/
phone_numbers
/
buy
curl --request POST \
  --url https://api.voiceos.io/phone_numbers/buy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "provider": "twilio",
  "phone_number": "<string>"
}'
{
  "uri": "<string>",
  "inbound_agent_id": "<string>",
  "phone_number": "<string>",
  "account_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "telephony": {
    "provider": "twilio",
    "phone_number_sid": "<string>",
    "account_sid": "<string>",
    "auth_token": "<string>"
  },
  "webhooks": [
    {
      "events": [
        "phone_call:connection_requested"
      ],
      "url": "<string>",
      "method": "GET",
      "headers": {},
      "filter": "<string>"
    }
  ],
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Response

200
application/json
Successful Response

The response is of type object.