---
title: "Purchase available number (deprecated, use /phone_numbers instead)"
method: POST
path: "/phone_numbers/purchase"
---

# Purchase available number (deprecated, use /phone_numbers instead)

`POST /phone_numbers/purchase`

## Request

- Base URL: `https://api.vogent.ai/api`
- URL: `https://api.vogent.ai/api/phone_numbers/purchase`
- Auth: HTTP bearer

Purchase an available phone number.

## Request body

- PhoneNumberPurchaseInput
  - `number` string, required: The number as returned by the phone number search endpoint.

## Response `200`

Successful operation

- PhoneNumber
  - `id` string, required
  - `number` string, required: The number in e.164 format, or the SIP username, if the type is SIP_USERNAME.
  - `type` 'PSTN' | 'SIP_USERNAME', required
  - `agentId` string, nullable, required: The ID of the linked agent, if the phone number is linked to one.

## Other responses

- `400`: Invalid input
- `422`: Validation exception

---

[API](https://skmtc.dev/vogent/apis/vogent-openapi-3-0.md) - [All operations](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/revisions/a5966cc364ef?raw)
