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

# List Phone Numbers

> Your account's phone numbers, assigned or not, and when each was last used

Returns every phone number on your account, including numbers that no agent answers. Each number carries `last_call_at`, the start of its most
recent call (inbound or outbound), or `null` if it has never been used.

Use it to see your pool: which numbers are free, which an agent answers, and when each was
last used. To take a number, use [Allocate Phone Number](https://docs.voicy.co/api-reference/phone-number-allocate.md),
which picks a free one and assigns it atomically, so two simultaneous requests never get the
same number; free it again with [Release Phone Number](https://docs.voicy.co/api-reference/phone-number-release.md).

## Query Parameters

**assigned** `boolean`

`true` returns only numbers an agent answers, `false` only numbers with no agent.
Omit it to list every number. Any other value is a `400`.

## Response

An array, sorted by phone number. Each item:

**phone\_number** `string`

The number in E.164.

**agent\_id** `string | null`

The agent that answers the number, or `null`.

**agent\_name** `string | null`

That agent's name.

**status** `string`

`active` when an agent answers the number, `unassigned` otherwise.

**allocation\_ref** `string | null`

The `reference` the number was allocated with ([Allocate Phone Number](https://docs.voicy.co/api-reference/phone-number-allocate.md)), or `null`.

**allocated\_at** `string | null`

When it was allocated (ISO 8601, UTC), or `null`.

**last\_call\_at** `string | null`

When the number's most recent call started (ISO 8601, UTC), or `null` if it has never been used. Test calls count.

```bash cURL theme={null}
curl "https://api.voicy.co/functions/v1/phone-number-list?assigned=false" \
  -H "Authorization: Bearer voicy_sk_live_xxx"
```

```javascript JavaScript theme={null}
const numbers = await (await fetch(
  'https://api.voicy.co/functions/v1/phone-number-list?assigned=false',
  { headers: { 'Authorization': 'Bearer voicy_sk_live_xxx' } },
)).json();

// Never used first, then the one idle the longest.
const next = numbers.sort((a, b) =>
  (a.last_call_at ?? '').localeCompare(b.last_call_at ?? ''))[0];
```

```python Python theme={null}
import requests
numbers = requests.get(
    "https://api.voicy.co/functions/v1/phone-number-list",
    headers={'Authorization': 'Bearer voicy_sk_live_xxx'},
    params={'assigned': 'false'},
).json()

# Never used first, then the one idle the longest.
next_number = min(numbers, key=lambda n: n['last_call_at'] or '')
```

```json 200 OK theme={null}
[
  {
    "phone_number": "+972771234567",
    "agent_id": null,
    "agent_name": null,
    "status": "unassigned",
    "allocation_ref": null,
    "allocated_at": null,
    "last_call_at": null
  },
  {
    "phone_number": "+972771234568",
    "agent_id": null,
    "agent_name": null,
    "status": "unassigned",
    "allocation_ref": null,
    "allocated_at": null,
    "last_call_at": "2026-10-05T09:30:00.000Z"
  }
]
```

```json 400 Bad Request theme={null}
{
  "status": "error",
  "message": "assigned must be true or false"
}
```

```json 429 Too Many Requests theme={null}
{
  "status": "error",
  "message": "Too many requests: this API key is limited to 600 requests per minute. Retry after 23 seconds."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.