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

> Get all FQDNs belonging to the user that match the given filters.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/sip-connections.yml get /fqdns
openapi: 3.1.0
info:
  title: Telnyx SIP Connections API
  version: 2.0.0
  description: API for SIP connections.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /fqdns:
    get:
      tags:
        - FQDNs
      summary: List FQDNs
      description: Get all FQDNs belonging to the user that match the given filters.
      operationId: ListFqdns
      parameters:
        - $ref: '#/components/parameters/connections_PageConsolidated'
        - name: filter
          in: query
          style: deepObject
          explode: true
          description: >-
            Consolidated filter parameter (deepObject style). Originally:
            filter[connection_id], filter[fqdn], filter[port],
            filter[dns_record_type]
          schema:
            type: object
            properties:
              connection_id:
                type: string
                description: ID of the FQDN connection to which the FQDN belongs.
              fqdn:
                type: string
                example: example.com
                description: FQDN represented by the resource.
              port:
                type: integer
                example: 5060
                description: Port to use when connecting to the FQDN.
              dns_record_type:
                type: string
                example: a
                description: DNS record type used by the FQDN.
      responses:
        '200':
          $ref: '#/components/responses/ListFqdnsResponse'
        '400':
          $ref: '#/components/responses/connections_BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthenticatedResponse'
      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 fqdn of client.fqdns.list()) {
              console.log(fqdn.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.fqdns.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.Fqdns.List(context.TODO(), telnyx.FqdnListParams{})\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.fqdns.FqdnListPage;
            import com.telnyx.sdk.models.fqdns.FqdnListParams;

            public final class Main {
                private Main() {}

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

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

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

            page = telnyx.fqdns.list

            puts(page)
        - lang: CLI
          source: |-
            telnyx fqdns list \
              --api-key 'My API Key'
components:
  parameters:
    connections_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: 250
            description: The size of the page
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load
  responses:
    ListFqdnsResponse:
      description: Successful response with a list of FQDN connections.
      content:
        application/json:
          schema:
            type: object
            title: List FQDNs Response
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Fqdn'
              meta:
                $ref: '#/components/schemas/connections_PaginationMeta'
    connections_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              value:
                errors:
                  - code: '10015'
                    title: Bad Request
                    detail: The request failed because it was not well-formed.
                    source:
                      pointer: /
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10015
    UnauthenticatedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          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
  schemas:
    Fqdn:
      type: object
      title: Fqdn
      properties:
        id:
          type: string
          description: Identifies the resource.
          example: '1293384261075731499'
          x-format: int64
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: fqdn
        connection_id:
          type: string
          description: ID of the FQDN connection to which this FQDN is attached.
        fqdn:
          type: string
          description: FQDN represented by this resource.
          example: example.com
        port:
          type: integer
          description: Port to use when connecting to this FQDN.
          default: 5060
          example: 5060
        dns_record_type:
          type: string
          description: >-
            The DNS record type for the FQDN. For cases where a port is not set,
            the DNS record type must be 'srv'. For cases where a port is set,
            the DNS record type must be 'a'. If the DNS record type is 'a' and a
            port is not specified, 5060 will be used.
          example: a
        created_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2018-02-02T22:25:27.521Z'
      example:
        id: '1293384261075731499'
        record_type: fqdn
        connection_id: '1516447646313612565'
        fqdn: example.com
        port: 5060
        dns_record_type: a
        created_at: '2018-02-02T22:25:27.521Z'
        updated_at: '2018-02-02T22:25:27.521Z'
    connections_PaginationMeta:
      title: Pagination Meta
      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
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              detail:
                type: string
              meta:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
              title:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````