> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Purchase

> StateSet Voice API operation.

StateSet Voice API operation.

### Request body

`PurchaseBody`

<ParamField body="phone_number" type="string" required>
  E.164 phone number to purchase, as returned by `GET /api/v1/customer/numbers/search`
</ParamField>

### Response

No response body — phone number purchased and routed to the tenant.

### Status codes

| Code  | Meaning                                                            |
| ----- | ------------------------------------------------------------------ |
| `201` | Phone number purchased and routed to the tenant                    |
| `402` | Payment method required                                            |
| `404` | Number provisioning disabled or customer self-serve plane disabled |
| `409` | Number limit reached or number already claimed                     |
| `502` | Number provider (Twilio) error                                     |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.voice.stateset.com/api/v1/customer/numbers' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "phone_number": "+15555555678"
  }'
  ```
</RequestExample>
