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

# List all porting phone numbers

> Returns a list of your porting phone numbers.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-phone-numbers.yml get /porting_phone_numbers
openapi: 3.1.0
info:
  title: Telnyx Porting Phone Numbers API
  version: 2.0.0
  description: API for porting phone numbers, blocks, extensions, and configurations.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting_phone_numbers:
    get:
      tags:
        - Porting Orders
      summary: List all porting phone numbers
      description: Returns a list of your porting phone numbers.
      operationId: ListPortingPhoneNumbers
      parameters:
        - $ref: '#/components/parameters/porting-order_PageConsolidated'
        - name: filter
          in: query
          style: deepObject
          explode: true
          description: >-
            Consolidated filter parameter (deepObject style). Originally:
            filter[porting_order_status]
          schema:
            type: object
            properties:
              porting_order_status:
                type: string
                enum:
                  - draft
                  - in-process
                  - submitted
                  - exception
                  - foc-date-confirmed
                  - cancel-pending
                  - ported
                  - cancelled
                example: in-process
                description: Filter results by porting order status
      responses:
        '200':
          $ref: '#/components/responses/ListPortingPhoneNumbers'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable entity. Check message field in response for details.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            // Automatically fetches more pages as needed.

            for await (const portingPhoneNumberListResponse of
            client.portingPhoneNumbers.list()) {
              console.log(portingPhoneNumberListResponse.porting_order_id);
            }
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            page = client.porting_phone_numbers.list()
            page = page.data[0]
            print(page.porting_order_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.PortingPhoneNumbers.List(context.TODO(), telnyx.PortingPhoneNumberListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.portingphonenumbers.PortingPhoneNumberListPage;

            import
            com.telnyx.sdk.models.portingphonenumbers.PortingPhoneNumberListParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    PortingPhoneNumberListPage page = client.portingPhoneNumbers().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.porting_phone_numbers.list

            puts(page)
        - lang: CLI
          source: |-
            telnyx porting-phone-numbers list \
              --api-key 'My API Key'
components:
  parameters:
    porting-order_PageConsolidated:
      name: page
      in: query
      style: deepObject
      explode: true
      description: >-
        Consolidated page parameter (deepObject style). Originally: page[size],
        page[number]
      schema:
        type: object
        properties:
          size:
            type: integer
            minimum: 1
            maximum: 250
            default: 20
            description: The size of the page
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load
  responses:
    ListPortingPhoneNumbers:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortingPhoneNumber'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
        text/csv:
          schema:
            type: string
            example: "phone_number,phone_number_type,porting_order_id,support_key,porting_order_status\r\n+12003155566,local,5f940c35-ef28-4408-bb95-af73b047d589,sr_a12345,draft\r\n"
  schemas:
    PortingPhoneNumber:
      type: object
      properties:
        porting_order_status:
          type: string
          description: The current status of the porting order
          enum:
            - draft
            - in-process
            - submitted
            - exception
            - foc-date-confirmed
            - cancel-pending
            - ported
            - cancelled
          example: in-process
        phone_number_type:
          type: string
          description: The type of the phone number
          enum:
            - landline
            - local
            - mobile
            - national
            - shared_cost
            - toll_free
          example: local
        phone_number:
          type: string
          description: E164 formatted phone number
          example: '13035550987'
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the associated port request
          example: f1486bae-f067-460c-ad43-73a92848f902
        support_key:
          type: string
          description: >-
            A key to reference this porting order when contacting Telnyx
            customer support
          example: sr_a12345
        activation_status:
          $ref: '#/components/schemas/PortingOrderActivationStatus'
        portability_status:
          $ref: '#/components/schemas/PortabilityStatus'
        requirements_status:
          type: string
          description: The current status of the requirements in a INTL porting order
          enum:
            - requirement-info-pending
            - requirement-info-under-review
            - requirement-info-exception
            - approved
          example: approved
        record_type:
          type: string
          example: porting_phone_number
          description: Identifies the type of the resource.
          readOnly: true
    PaginationMeta:
      type: object
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 55
        page_number:
          type: integer
          example: 2
        page_size:
          type: integer
          example: 25
    PortingOrderActivationStatus:
      type: string
      description: Activation status
      enum:
        - New
        - Pending
        - Conflict
        - Cancel Pending
        - Failed
        - Concurred
        - Activate RDY
        - Disconnect Pending
        - Concurrence Sent
        - Old
        - Sending
        - Active
        - Cancelled
      example: Active
    PortabilityStatus:
      type: string
      description: >-
        Specifies whether Telnyx is able to confirm portability this number in
        the United States & Canada. International phone numbers are provisional
        by default.
      enum:
        - pending
        - confirmed
        - provisional
      example: confirmed
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````