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

> Updates the FQDN authentication strategy for a specific FQDN connection.



## OpenAPI

````yaml /openapi/source/external/connections/connections.json patch /fqdn_connections/{fqdn_connection_id}/fqdn_authentication
openapi: 3.1.0
info:
  version: 2.0.0
  x-latency-category: responsive
  x-endpoint-cost: light
  title: Telnyx API
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Connections
    description: Connections operations
  - name: IP Connections
    description: IP connection operations
  - name: Credential Connections
    description: Credential connection operations
  - name: UAC Connections
    description: UAC connection operations
  - name: IPs
    description: IP operations
  - name: FQDN Connections
    description: FQDN connection operations
  - name: FQDNs
    description: FQDN operations
paths:
  /fqdn_connections/{fqdn_connection_id}/fqdn_authentication:
    patch:
      tags:
        - FQDN Connections
      summary: Update an FQDN authentication
      description: Updates the FQDN authentication strategy for a specific FQDN connection.
      operationId: UpdateFqdnAuthentication
      parameters:
        - $ref: '#/components/parameters/FqdnConnectionId'
      requestBody:
        description: Parameters that can be updated in an FQDN authentication
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFqdnAuthenticationRequest'
      responses:
        '200':
          description: Successful response with the updated FQDN authentication.
          content:
            application/json:
              schema:
                type: object
                title: FQDN Authentication Response
                properties:
                  data:
                    $ref: '#/components/schemas/FqdnAuthentication'
        '401':
          $ref: '#/components/responses/UnauthenticatedResponse'
        '403':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '409':
          description: >-
            Conflict. Another update to this connection is still in progress.
            Wait and retry the request later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - detail: >-
                      A previous update to this connection is still in progress.
                      Please try again later.
        '422':
          $ref: '#/components/responses/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 response = await
            client.fqdnConnections.fqdnAuthentication.patchAll('fqdn_connection_id');


            console.log(response.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
            )
            response = client.fqdn_connections.fqdn_authentication.patch_all(
                fqdn_connection_id="fqdn_connection_id",
            )
            print(response.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\tresponse, err := client.FqdnConnections.FqdnAuthentication.PatchAll(\n\t\tcontext.TODO(),\n\t\t\"fqdn_connection_id\",\n\t\ttelnyx.FqdnConnectionFqdnAuthenticationPatchAllParams{\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.fqdnConnections.fqdnAuthentication.FqdnAuthenticationPatchAllParams;


            public final class Main {
                private Main() {}

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

                    FqdnAuthenticationPatchAllParams params = FqdnAuthenticationPatchAllParams.builder()
                        .build();
                    var response = client.fqdnConnections().fqdnAuthentication().patchAll("fqdn_connection_id", params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.fqdn_connections.fqdn_authentication.patch_all("fqdn_connection_id")


            puts(response)
        - 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 {
              $response = $client->fqdnConnections->fqdnAuthentication->patchAll(
                'fqdn_connection_id',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx fqdn-connections:fqdn-authentication patch-all \
              --api-key 'My API Key' \
              --fqdn-connection-id fqdn_connection_id
components:
  parameters:
    FqdnConnectionId:
      name: fqdn_connection_id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the FQDN connection.
  schemas:
    UpdateFqdnAuthenticationRequest:
      type: object
      title: Update FQDN Authentication Request
      properties:
        user_name:
          type: string
          description: The username for authentication.
        password:
          type: string
          description: The password for authentication.
        ip_authentication_method:
          type: string
          description: The IP authentication method.
          enum:
            - token
            - p-charge-info
        fqdn_outbound_authentication:
          type: string
          description: The outbound authentication type.
          enum:
            - ip-authentication
            - credential-authentication
        webhook_url:
          type: string
          format: uri
          description: The webhook URL for authentication events.
        failover_url:
          type: string
          format: uri
          description: The failover webhook URL.
        txt_name:
          type: string
          description: The TXT record name for Microsoft Teams SBC DNS verification.
        txt_value:
          type: string
          description: The TXT record value for Microsoft Teams SBC DNS verification.
        txt_ttl:
          type: integer
          description: The TTL for the TXT record.
      example:
        user_name: newusername
        password: new_password
        ip_authentication_method: p-charge-info
        fqdn_outbound_authentication: ip-authentication
        webhook_url: https://example.com
        failover_url: https://failover.example.com
        txt_name: new_txt_name
        txt_value: new_txt_value
        txt_ttl: 300
    FqdnAuthentication:
      type: object
      title: FQDN Authentication
      properties:
        id:
          type: string
          description: Identifies the resource.
          example: '1293384261075731499'
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: fqdn_authentication
        connection_id:
          type: string
          description: >-
            The ID of the FQDN connection this authentication strategy belongs
            to.
          example: '1293384261075731499'
        user_name:
          type: string
          description: The username for authentication.
        password:
          type: string
          description: The password for authentication.
        ip_authentication_method:
          type: string
          description: The IP authentication method.
          enum:
            - token
            - p-charge-info
        fqdn_outbound_authentication:
          type: string
          description: The outbound authentication type.
          enum:
            - ip-authentication
            - credential-authentication
        webhook_url:
          type: string
          format: uri
          description: The webhook URL for authentication events.
        failover_url:
          type: string
          format: uri
          description: The failover webhook URL.
        microsoft_teams_sbc:
          type: boolean
          description: Whether the connection is a Microsoft Teams SBC.
          default: false
        txt_name:
          type: string
          description: The TXT record name for Microsoft Teams SBC DNS verification.
        txt_value:
          type: string
          description: The TXT record value for Microsoft Teams SBC DNS verification.
        txt_ttl:
          type: integer
          description: The TTL for the TXT record.
    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:
    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
    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: /
    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: /
    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:
      type: http
      scheme: bearer

````