> ## 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.

# Retrieve a comment



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/ordering.yml get /comments/{id}
openapi: 3.1.0
info:
  title: Telnyx Phone Number Ordering API
  version: 2.0.0
  description: API for ordering phone numbers.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /comments/{id}:
    get:
      tags:
        - Phone Number Orders
      summary: Retrieve a comment
      operationId: RetrieveComment
      parameters:
        - name: id
          in: path
          description: The comment ID.
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/CommentResponse'
        '400':
          $ref: '#/components/responses/numbers_BadRequestResponse'
        '401':
          $ref: '#/components/responses/numbers_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/numbers_NotFoundResponse'
        '422':
          $ref: '#/components/responses/numbers_UnprocessableEntity'
        '500':
          $ref: '#/components/responses/numbers_GenericErrorResponse'
      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
            });

            const comment = await client.comments.retrieve('id');

            console.log(comment.data);
        - 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
            )
            comment = client.comments.retrieve(
                "id",
            )
            print(comment.data)
        - 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\tcomment, err := client.Comments.Get(context.TODO(), \"id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", comment.Data)\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.comments.CommentRetrieveParams;
            import com.telnyx.sdk.models.comments.CommentRetrieveResponse;

            public final class Main {
                private Main() {}

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

                    CommentRetrieveResponse comment = client.comments().retrieve("id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            comment = telnyx.comments.retrieve("id")

            puts(comment)
        - lang: CLI
          source: |-
            telnyx comments retrieve \
              --api-key 'My API Key' \
              --id id
components:
  responses:
    CommentResponse:
      description: A Comment Response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                allOf:
                  - $ref: '#/components/schemas/Comment'
                  - type: object
    numbers_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
          examples:
            Authentication Failed:
              value:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not understand the provided credentials.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
    numbers_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnprocessableEntity:
      description: Unprocessable entity. Check the 'detail' field in response for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
  schemas:
    Comment:
      properties:
        id:
          type: string
          format: uuid
          example: 12ade33a-21c0-473b-b055-b3c836e1c292
          readOnly: true
        body:
          type: string
          example: Hi there, ....
        commenter:
          type: string
          example: user@company.com
          readOnly: true
        commenter_type:
          type: string
          example: user
          enum:
            - admin
            - user
          readOnly: true
        comment_record_type:
          type: string
          example: sub_number_order
          enum:
            - sub_number_order
            - requirement_group
        comment_record_id:
          type: string
          format: uuid
          example: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576
        read_at:
          type: string
          format: date-time
          description: An ISO 8901 datetime string for when the comment was read.
          example: '2018-01-01T00:00:00.000000Z'
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: An ISO 8901 datetime string denoting when the comment was created.
          example: '2018-01-01T00:00:00.000000Z'
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: An ISO 8901 datetime string for when the comment was updated.
          example: '2018-01-01T00:00:00.000000Z'
          readOnly: true
      type: object
    numbers_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/numbers_Error'
      type: object
    numbers_Error:
      properties:
        code:
          type: string
          example: '10007'
        title:
          type: string
          example: Unexpected error
        detail:
          type: string
          example: An unexpected error occured.
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              example: /base
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
              description: URL with additional information on the error.
              example: https://developers.telnyx.com/docs/overview/errors/10015
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````