# Search available numbers

Searches available numbers.

```http
GET https://api.pozy.ai/v1/whatsapp/phone-numbers/available
```

- Area: WhatsApp / WhatsApp Phone Numbers
- Auth: Authorization: Bearer pz_live_...
- Deprecated

## Query parameters

- `country` (string)
- `numberType` (string): one of local, mobile, national, toll_free
- `areaCode` (string)
- `type` (string)
- `prefix` (string)
- `locality` (string)
- `contains` (string)
- `limit` (integer)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/whatsapp/phone-numbers/available?limit=20" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/whatsapp/phone-numbers/available?limit=20", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/whatsapp/phone-numbers/available",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "limit": 20,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `country`, string
- `numberType`, string
- `numbers`, array of object
  - `phoneNumber`, string
  - `locality`, string
  - `bestEffort`, boolean

```json
{
  "country": "US",
  "numberType": "string",
  "numbers": [
    {
      "phoneNumber": "+14155550123",
      "locality": "string",
      "bestEffort": true
    }
  ]
}
```
