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

# List Phone Numbers

> Retrieve all phone numbers with optional filtering and pagination.



## OpenAPI

````yaml get /v1/phone-numbers
openapi: 3.1.0
info:
  title: OpenMic v1 External API
  description: >-
    API specification for OpenMic v1 External API, providing endpoints for bot
    management, call handling, and phone number operations.
  version: 1.0.0
servers:
  - url: https://api.openmic.ai
    description: Production Environment
security:
  - api_key: []
tags:
  - name: Calls
    description: Endpoints related to phone call creation and management.
  - name: Bots
    description: Endpoints related to bot management and configuration.
  - name: Phone Numbers
    description: Endpoints related to phone number management and bot linking.
  - name: Knowledge Bases
  - name: FAQs
  - name: Campaigns
  - name: Tools
  - name: Contact Lists
  - name: Contacts
  - name: Voices
    description: >-
      Endpoints for browsing available text-to-speech voices. Voices are
      read-only and can be filtered by gender, provider, language, and accent.
  - name: SMS
    description: Endpoints for sending SMS messages.
paths:
  /v1/phone-numbers:
    get:
      tags:
        - Phone Numbers
      summary: List Phone Numbers
      description: Retrieve all phone numbers with optional filtering and pagination.
      parameters:
        - name: limit
          in: query
          description: Maximum number of phone numbers to return (1-100)
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: offset
          in: query
          description: Number of phone numbers to skip
          schema:
            type: integer
            minimum: 0
        - name: phone_number
          in: query
          description: Filter by phone number (partial match)
          schema:
            type: string
        - name: name
          in: query
          description: Filter by name (partial match)
          schema:
            type: string
      responses:
        '200':
          description: List of phone numbers retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPhoneNumbersResponse'
              example:
                phone_numbers:
                  - phone_number_id: ybhb8wzi487w02m2bc7dh0ev
                    phone_number: '+15551112222'
                    name: Main Support Line
                    inbound_agent_id: bvrg8wzi487w02m2bc7dh0ev
                    outbound_agent_id: bvrg8wzi487w02m2bc7dh0ev
                    created_at: '2023-01-01T12:00:00Z'
                    updated_at: '2023-01-02T15:30:00Z'
                pagination:
                  limit: 1
                  offset: 0
                  total: 1
                  has_more: false
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid query parameters provided.
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Unauthorized
                message: Invalid or expired API key
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: An unexpected error occurred. Please try again later.
components:
  schemas:
    ListPhoneNumbersResponse:
      type: object
      properties:
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumberResponse'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - phone_numbers
        - pagination
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Additional error message (for certain error types)
      required:
        - error
    PhoneNumberResponse:
      type: object
      properties:
        phone_number_id:
          type: string
          description: Unique identifier of the phone number
        phone_number:
          type: string
          description: Phone number in E.164 format
        name:
          type: string
          description: Friendly name for the phone number
        inbound_agent_id:
          type: string
          description: Bot ID for inbound calls
        outbound_agent_id:
          type: string
          description: Bot ID for outbound calls
        created_at:
          type: string
          format: date-time
          description: Phone number creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Phone number last update timestamp
      required:
        - phone_number_id
        - phone_number
        - created_at
        - updated_at
    Pagination:
      type: object
      properties:
        limit:
          type: integer
          description: Number of items per page
        offset:
          type: integer
          description: Number of items skipped
        total:
          type: integer
          description: Total number of items
        has_more:
          type: boolean
          description: Whether there are more items
      required:
        - limit
        - offset
        - total
        - has_more
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Include your API key in the Authorization header
        as: `Authorization: Bearer <your-api-key>`

````