> ## 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 a Fax Application

> Updates settings of an existing Fax Application based on the parameters of the request.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/fax.yml patch /fax_applications/{id}
openapi: 3.1.0
info:
  title: Telnyx Fax API
  version: 2.0.0
  description: API for Fax.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /fax_applications/{id}:
    patch:
      tags:
        - Programmable Fax Applications
      summary: Update a Fax Application
      description: >-
        Updates settings of an existing Fax Application based on the parameters
        of the request.
      operationId: UpdateFaxApplication
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        description: Parameters to be updated for the Fax Application
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFaxApplicationRequest'
      responses:
        '200':
          $ref: '#/components/responses/FaxApplicationResponse'
        '401':
          $ref: '#/components/responses/UnauthenticatedResponse'
        '403':
          $ref: '#/components/responses/programmable-fax_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/programmable-fax_NotFoundResponse'
        '422':
          $ref: '#/components/responses/programmable-fax_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 faxApplication = await
            client.faxApplications.update('1293384261075731499', {
              application_name: 'fax-router',
              webhook_event_url: 'https://example.com',
            });


            console.log(faxApplication.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
            )
            fax_application = client.fax_applications.update(
                id="1293384261075731499",
                application_name="fax-router",
                webhook_event_url="https://example.com",
            )
            print(fax_application.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\tfaxApplication, err := client.FaxApplications.Update(\n\t\tcontext.TODO(),\n\t\t\"1293384261075731499\",\n\t\ttelnyx.FaxApplicationUpdateParams{\n\t\t\tApplicationName: \"fax-router\",\n\t\t\tWebhookEventURL: \"https://example.com\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", faxApplication.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.faxapplications.FaxApplicationUpdateParams;

            import
            com.telnyx.sdk.models.faxapplications.FaxApplicationUpdateResponse;


            public final class Main {
                private Main() {}

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

                    FaxApplicationUpdateParams params = FaxApplicationUpdateParams.builder()
                        .id("1293384261075731499")
                        .applicationName("fax-router")
                        .webhookEventUrl("https://example.com")
                        .build();
                    FaxApplicationUpdateResponse faxApplication = client.faxApplications().update(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            fax_application = telnyx.fax_applications.update(
              "1293384261075731499",
              application_name: "fax-router",
              webhook_event_url: "https://example.com"
            )

            puts(fax_application)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;

            use Telnyx\CredentialConnections\AnchorsiteOverride;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $faxApplication = $client->faxApplications->update(
                '1293384261075731499',
                applicationName: 'fax-router',
                webhookEventURL: 'https://example.com',
                active: false,
                anchorsiteOverride: AnchorsiteOverride::AMSTERDAM_NETHERLANDS,
                faxEmailRecipient: 'user@example.com',
                inbound: [
                  'channelLimit' => 10,
                  'sipSubdomain' => 'example',
                  'sipSubdomainReceiveSettings' => 'only_my_connections',
                ],
                outbound: [
                  'channelLimit' => 10, 'outboundVoiceProfileID' => '1293384261075731499'
                ],
                tags: ['tag1', 'tag2'],
                webhookEventFailoverURL: 'https://failover.example.com',
                webhookTimeoutSecs: 25,
              );

              var_dump($faxApplication);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx fax-applications update \
              --api-key 'My API Key' \
              --id 1293384261075731499 \
              --application-name fax-router \
              --webhook-event-url https://example.com
components:
  parameters:
    id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
  schemas:
    UpdateFaxApplicationRequest:
      type: object
      title: Update Fax Application Request
      required:
        - application_name
        - webhook_event_url
      properties:
        application_name:
          $ref: '#/components/schemas/ApplicationName'
        active:
          $ref: '#/components/schemas/ConnectionActive'
        anchorsite_override:
          $ref: '#/components/schemas/AnchorsiteOverride'
        webhook_event_url:
          $ref: '#/components/schemas/WebhookEventUrl'
        webhook_event_failover_url:
          $ref: '#/components/schemas/WebhookEventFailoverUrl'
        webhook_timeout_secs:
          $ref: '#/components/schemas/WebhookTimeoutSecs'
        fax_email_recipient:
          $ref: '#/components/schemas/FaxEmailRecipient'
        tags:
          type: array
          items:
            type: string
          description: Tags associated with the Fax Application.
          example:
            - tag1
            - tag2
        inbound:
          type: object
          properties:
            channel_limit:
              type: integer
              description: >-
                When set, this will limit the number of concurrent inbound calls
                to phone numbers associated with this connection.
              default: null
              example: 10
            sip_subdomain:
              type: string
              description: >-
                Specifies a subdomain that can be used to receive Inbound calls
                to a Connection, in the same way a phone number is used, from a
                SIP endpoint. Example: the subdomain "example.sip.telnyx.com"
                can be called from any SIP endpoint by using the SIP URI
                "sip:@example.sip.telnyx.com" where the user part can be any
                alphanumeric value. Please note TLS encrypted calls are not
                allowed for subdomain calls.
              default: null
              example: example
            sip_subdomain_receive_settings:
              type: string
              description: >-
                This option can be enabled to receive calls from: "Anyone" (any
                SIP endpoint in the public Internet) or "Only my connections"
                (any connection assigned to the same Telnyx user).
              enum:
                - only_my_connections
                - from_anyone
              default: from_anyone
              example: only_my_connections
        outbound:
          type: object
          properties:
            channel_limit:
              type: integer
              description: >-
                When set, this will limit the number of concurrent outbound
                calls to phone numbers associated with this connection.
              default: null
              example: 10
            outbound_voice_profile_id:
              $ref: '#/components/schemas/OutboundVoiceProfileId'
      example:
        application_name: fax-router
        active: false
        anchorsite_override: Amsterdam, Netherlands
        webhook_event_url: https://example.com
        webhook_event_failover_url: https://failover.example.com
        webhook_timeout_secs: 25
        tags:
          - tag1
          - tag2
        inbound:
          channel_limit: 10
          sip_subdomain: example
          sip_subdomain_receive_settings: only_my_connections
        outbound:
          channel_limit: 10
          outbound_voice_profile_id: '1293384261075731499'
    ApplicationName:
      title: Application Name
      type: string
      description: A user-assigned name to help manage the application.
      example: call-router
    ConnectionActive:
      title: Connection Active
      type: boolean
      description: Specifies whether the connection can be used.
      default: true
      example: false
    AnchorsiteOverride:
      title: Anchorsite Override
      type: string
      description: >-
        `Latency` directs Telnyx to route media through the site with the lowest
        round-trip time to the user's connection. Telnyx calculates this time
        using ICMP ping messages. This can be disabled by specifying a site to
        handle all media.
      enum:
        - Latency
        - Chicago, IL
        - Ashburn, VA
        - San Jose, CA
        - Sydney, Australia
        - Amsterdam, Netherlands
        - London, UK
        - Toronto, Canada
        - Vancouver, Canada
        - Frankfurt, Germany
      default: Latency
      example: Amsterdam, Netherlands
    WebhookEventUrl:
      title: Webhook Event URL
      description: >-
        The URL where webhooks related to this connection will be sent. Must
        include a scheme, such as 'https'.
      type: string
      format: uri
      example: https://example.com
    WebhookEventFailoverUrl:
      title: Webhook Event Failover URL
      description: >-
        The failover URL where webhooks related to this connection will be sent
        if sending to the primary URL fails. Must include a scheme, such as
        'https'.
      type:
        - string
        - 'null'
      format: uri
      default: ''
      example: https://failover.example.com
    WebhookTimeoutSecs:
      title: Webhook Timeout Secs
      type:
        - integer
        - 'null'
      description: Specifies how many seconds to wait before timing out a webhook.
      minimum: 0
      maximum: 30
      default: null
      example: 25
    FaxEmailRecipient:
      title: Fax Email Recipient
      type:
        - string
        - 'null'
      description: >-
        Specifies an email address where faxes sent to this application will be
        forwarded to (as pdf or tiff attachments)
      default: null
      example: user@example.com
    OutboundVoiceProfileId:
      title: Outbound Voice Profile ID
      type: string
      description: Identifies the associated outbound voice profile.
      example: '1293384261075731499'
    FaxApplication:
      type: object
      title: Fax Application
      properties:
        id:
          $ref: '#/components/schemas/IntId'
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: fax_application
        application_name:
          $ref: '#/components/schemas/ApplicationName'
        active:
          $ref: '#/components/schemas/ConnectionActive'
        anchorsite_override:
          $ref: '#/components/schemas/AnchorsiteOverride'
        webhook_event_url:
          $ref: '#/components/schemas/WebhookEventUrl'
        webhook_event_failover_url:
          $ref: '#/components/schemas/WebhookEventFailoverUrl'
        webhook_timeout_secs:
          $ref: '#/components/schemas/WebhookTimeoutSecs'
        tags:
          type: array
          items:
            type: string
          description: Tags associated with the Fax Application.
          example:
            - tag1
            - tag2
          default: []
        inbound:
          type: object
          properties:
            channel_limit:
              type: integer
              description: >-
                When set, this will limit the number of concurrent inbound calls
                to phone numbers associated with this connection.
              default: null
              example: 10
            sip_subdomain:
              type: string
              description: >-
                Specifies a subdomain that can be used to receive Inbound calls
                to a Connection, in the same way a phone number is used, from a
                SIP endpoint. Example: the subdomain "example.sip.telnyx.com"
                can be called from any SIP endpoint by using the SIP URI
                "sip:@example.sip.telnyx.com" where the user part can be any
                alphanumeric value. Please note TLS encrypted calls are not
                allowed for subdomain calls.
              default: null
              example: example
            sip_subdomain_receive_settings:
              type: string
              description: >-
                This option can be enabled to receive calls from: "Anyone" (any
                SIP endpoint in the public Internet) or "Only my connections"
                (any connection assigned to the same Telnyx user).
              enum:
                - only_my_connections
                - from_anyone
              default: from_anyone
              example: only_my_connections
        outbound:
          type: object
          properties:
            channel_limit:
              type: integer
              description: >-
                When set, this will limit the number of concurrent outbound
                calls to phone numbers associated with this connection.
              default: null
              example: 10
            outbound_voice_profile_id:
              $ref: '#/components/schemas/OutboundVoiceProfileId'
        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: fax_application
        application_name: fax-router
        active: false
        anchorsite_override: Amsterdam, Netherlands
        webhook_event_url: https://example.com
        webhook_event_failover_url: https://failover.example.com
        webhook_timeout_secs: 25
        inbound:
          channel_limit: 10
          sip_subdomain: example
          sip_subdomain_receive_settings: only_my_connections
        outbound:
          channel_limit: 10
          outbound_voice_profile_id: '1293384261075731499'
        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
    programmable-fax_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/programmable-fax_Error'
      type: object
    IntId:
      title: Int ID
      type: string
      description: Uniquely identifies the resource.
      example: '1293384261075731499'
    programmable-fax_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
  responses:
    FaxApplicationResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            title: Fax Application Response
            properties:
              data:
                $ref: '#/components/schemas/FaxApplication'
    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
    programmable-fax_UnauthorizedResponse:
      description: Unauthorized
    programmable-fax_NotFoundResponse:
      description: The requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmable-fax_Errors'
          example:
            errors:
              - code: '404'
                title: Not Found
                detail: The requested resource does not exist
    programmable-fax_UnprocessableEntityResponse:
      description: >-
        Unprocessable entity. The request was well-formed but contains semantic
        errors.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmable-fax_Errors'
          example:
            errors:
              - code: '422'
                title: Unprocessable Entity
                detail: The request parameters failed validation
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````