> ## 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 document links

> List all documents links ordered by created_at descending.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/documents.yml get /document_links
openapi: 3.1.0
info:
  title: Telnyx Documents API
  version: 2.0.0
  description: API for Documents.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /document_links:
    get:
      tags:
        - Documents
      summary: List all document links
      description: List all documents links ordered by created_at descending.
      operationId: ListDocumentLinks
      parameters:
        - $ref: '#/components/parameters/FilterDocumentLinksConsolidated'
        - $ref: '#/components/parameters/documents_PageConsolidated'
      responses:
        '200':
          $ref: '#/components/responses/ListDocServiceDocumentLinksResponse'
        '422':
          description: >-
            Unprocessable entity. Check the 'detail' field in response for
            details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/documents_Errors'
        default:
          $ref: '#/components/responses/documents_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
            });


            // Automatically fetches more pages as needed.

            for await (const documentLinkListResponse of
            client.documentLinks.list()) {
              console.log(documentLinkListResponse.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.document_links.list()
            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.DocumentLinks.List(context.TODO(), telnyx.DocumentLinkListParams{})\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.documentlinks.DocumentLinkListPage;
            import com.telnyx.sdk.models.documentlinks.DocumentLinkListParams;

            public final class Main {
                private Main() {}

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

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

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

            page = telnyx.document_links.list

            puts(page)
        - lang: CLI
          source: |-
            telnyx document-links list \
              --api-key 'My API Key'
components:
  parameters:
    FilterDocumentLinksConsolidated:
      name: filter
      in: query
      style: deepObject
      explode: true
      required: false
      description: >-
        Consolidated filter parameter for document links (deepObject style).
        Originally: filter[linked_record_type], filter[linked_resource_id]
      schema:
        type: object
        additionalProperties: false
        properties:
          linked_record_type:
            type: string
            example: porting_order
            description: The linked_record_type of the document to filter on.
          linked_resource_id:
            type: string
            format: uuid
            example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
            description: The linked_resource_id of the document to filter on.
    documents_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:
    ListDocServiceDocumentLinksResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/DocServiceDocumentLink'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
    documents_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/documents_Errors'
  schemas:
    documents_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/documents_Error'
      type: object
    DocServiceDocumentLink:
      allOf:
        - $ref: '#/components/schemas/DocServiceRecord'
        - type: object
          properties:
            record_type:
              description: Identifies the type of the resource.
              type: string
              readOnly: true
              example: document_link
            document_id:
              description: Identifies the associated document.
              type: string
              format: uuid
              readOnly: true
              example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
            linked_record_type:
              description: The linked resource's record type.
              type: string
              readOnly: true
              example: porting_order
            linked_resource_id:
              description: Identifies the linked resource.
              type: string
              readOnly: true
              example: 132091b4-442b-4a2a-b87f-61e707e46d54
    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
    documents_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
    DocServiceRecord:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: Identifies the type of the resource.
          readOnly: true
          example: sample_record_type
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            updated.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````