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

# Update an FQDN

> Update the details of a specific FQDN.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/sip-connections.yml patch /fqdns/{id}
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/{id}:
    patch:
      tags:
        - FQDNs
      summary: Update an FQDN
      description: Update the details of a specific FQDN.
      operationId: UpdateFqdn
      parameters:
        - $ref: '#/components/parameters/FqdnId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFqdnRequest'
      responses:
        '200':
          $ref: '#/components/responses/FqdnResponse'
        '401':
          $ref: '#/components/responses/UnauthenticatedResponse'
        '403':
          $ref: '#/components/responses/connections_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/connections_NotFoundResponse'
        '422':
          $ref: '#/components/responses/connections_UnprocessableEntityResponse'
      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 fqdn = await client.fqdns.update('1517907029795014409');

            console.log(fqdn.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
            )
            fqdn = client.fqdns.update(
                id="1517907029795014409",
            )
            print(fqdn.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\tfqdn, err := client.Fqdns.Update(\n\t\tcontext.TODO(),\n\t\t\"1517907029795014409\",\n\t\ttelnyx.FqdnUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fqdn.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.fqdns.FqdnUpdateParams;
            import com.telnyx.sdk.models.fqdns.FqdnUpdateResponse;

            public final class Main {
                private Main() {}

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

                    FqdnUpdateResponse fqdn = client.fqdns().update("1517907029795014409");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            fqdn = telnyx.fqdns.update("1517907029795014409")

            puts(fqdn)
        - lang: CLI
          source: |-
            telnyx fqdns update \
              --api-key 'My API Key' \
              --id 1517907029795014409
components:
  parameters:
    FqdnId:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1517907029795014409'
        x-format: int64
  schemas:
    UpdateFqdnRequest:
      title: Update FQDN Request
      type: object
      properties:
        connection_id:
          type: string
          description: ID of the FQDN connection to which this IP should be attached.
        fqdn:
          type: string
          description: FQDN represented by this resource.
          example: example.com
        port:
          type:
            - integer
            - 'null'
          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
      example:
        connection_id: '1516447646313612565'
        fqdn: example.com
        port: 8080
        dns_record_type: a
    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'
    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
  responses:
    FqdnResponse:
      description: Successful response with details about an FQDN connection.
      content:
        application/json:
          schema:
            type: object
            title: FQDN Response
            properties:
              data:
                $ref: '#/components/schemas/Fqdn'
    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
    connections_UnauthorizedResponse:
      description: >-
        The user doesn't have the required permissions to perform the requested
        action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notAuthorized:
              value:
                errors:
                  - code: '10010'
                    title: Not authorized
                    detail: You are not authorized to access the requested resource.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10010
                    source:
                      pointer: /
    connections_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notFound:
              value:
                errors:
                  - code: '10005'
                    title: Resource not found
                    detail: The requested resource or URL could not be found.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10005
                    source:
                      pointer: /
    connections_UnprocessableEntityResponse:
      description: >-
        The request was well-formed but was unable to be followed due to
        semantic errors.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unprocessableEntity:
              value:
                errors:
                  - code: '10015'
                    title: Bad Request
                    detail: >-
                      Invalid dnis_format: test, was provided. Acceptable
                      formats are +e164, e164, national, sip_username
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10015
                    source:
                      pointer: /inbound/dnis_number_format
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````