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

# Get Phone Numbers

> Retrieve all phone numbers configured in your Weya AI workspace.

Use this endpoint to retrieve all phone numbers associated with your Weya AI workspace. The response includes each phone number along with its current configuration and assignment status.

<Note>
  Only authenticated users can access phone numbers that belong to their workspace.
</Note>

### OpenAPI

```yaml theme={null}
openapi: 3.1.0
info:
  title: Get Phone Numbers
  version: 1.0.0

paths:
  /api/phone-numbers:
    get:
      summary: Retrieve all phone numbers
      description: Returns all phone numbers configured for the authenticated workspace.
      tags:
        - Phone Numbers

      security:
        - bearerAuth: []

      responses:
        "200":
          description: Phone numbers retrieved successfully.

        "401":
          description: Unauthorized.

        "500":
          description: Internal Server Error.

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
```

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer Token for the authenticated user.

  Format:

  `Authorization: Bearer YOUR_ACCESS_TOKEN`
</ParamField>

## Example Request

```bash theme={null}
curl --location '{{baseUrl}}/api/phone-numbers' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

## Successful Response

```json theme={null}
[
  {
    "_id": "6872d4b5f8d7a91234567890",
    "phoneNumber": "+14155552671",
    "provider": "Twilio",
    "country": "United States",
    "status": "Active",
    "assignedAgent": "Customer Support Agent",
    "createdAt": "2026-07-20T10:15:30.000Z"
  },
  {
    "_id": "6872d4b5f8d7a91234567891",
    "phoneNumber": "+919876543210",
    "provider": "Plivo",
    "country": "India",
    "status": "Active",
    "assignedAgent": "Sales Agent",
    "createdAt": "2026-07-20T11:05:42.000Z"
  }
]
```

## Response Fields

<ResponseField name="_id" type="string">
  Unique identifier of the phone number.
</ResponseField>

<ResponseField name="phoneNumber" type="string">
  The configured phone number in international format.
</ResponseField>

<ResponseField name="provider" type="string">
  Telephony provider associated with the phone number (for example, Twilio, Plivo, Telnyx, or Vobiz).
</ResponseField>

<ResponseField name="country" type="string">
  Country associated with the phone number.
</ResponseField>

<ResponseField name="status" type="string">
  Current status of the phone number.
</ResponseField>

<ResponseField name="assignedAgent" type="string">
  The AI Agent currently assigned to this phone number, if any.
</ResponseField>

<ResponseField name="createdAt" type="string">
  Timestamp indicating when the phone number was added.
</ResponseField>

## Error Responses

### Unauthorized (401)

```json theme={null}
{
  "success": false,
  "message": "Unauthorized"
}
```

### Internal Server Error (500)

```json theme={null}
{
  "success": false,
  "message": "Failed to retrieve phone numbers."
}
```
