> ## 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 comments of a porting order

> Returns a list of all comments of a porting order.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-orders.yml get /porting_orders/{id}/comments
openapi: 3.1.0
info:
  title: Telnyx Porting Orders API
  version: 2.0.0
  description: API for managing porting order lifecycle.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting_orders/{id}/comments:
    get:
      tags:
        - Porting Orders
      summary: List all comments of a porting order
      description: Returns a list of all comments of a porting order.
      operationId: ListPortingOrderComments
      parameters:
        - $ref: '#/components/parameters/PathPortingOrderID'
        - $ref: '#/components/parameters/porting-order_PageConsolidated'
      responses:
        '200':
          $ref: '#/components/responses/ListPortingOrdersComments'
        '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 commentListResponse of
            client.portingOrders.comments.list(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            )) {
              console.log(commentListResponse.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_orders.comments.list(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            page = page.data[0]
            print(page.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.PortingOrders.Comments.List(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.PortingOrderCommentListParams{},\n\t)\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.portingorders.comments.CommentListPage;

            import
            com.telnyx.sdk.models.portingorders.comments.CommentListParams;


            public final class Main {
                private Main() {}

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

                    CommentListPage page = client.portingOrders().comments().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            page =
            telnyx.porting_orders.comments.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(page)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $page = $client->portingOrders->comments->list(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', pageNumber: 0, pageSize: 0
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx porting-orders:comments list \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  parameters:
    PathPortingOrderID:
      name: id
      description: Porting Order id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    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:
    ListPortingOrdersComments:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortingOrdersComment'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
  schemas:
    PortingOrdersComment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: f1486bae-f067-460c-ad43-73a92848f902
        body:
          type: string
          description: Body of comment
          example: Great experience so far
        porting_order_id:
          type: string
          format: uuid
          example: f1486bae-f067-460c-ad43-73a92848f902
        user_type:
          type: string
          description: >-
            Indicates whether this comment was created by a Telnyx Admin, user,
            or system
          enum:
            - admin
            - user
            - system
          example: user
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: porting_comment
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527Z'
    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
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````