Skip to main content
PATCH
/
fax_applications
/
{id}
JavaScript
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);
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)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
faxApplication, err := client.FaxApplications.Update(
context.TODO(),
"1293384261075731499",
telnyx.FaxApplicationUpdateParams{
ApplicationName: "fax-router",
WebhookEventURL: "https://example.com",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", faxApplication.Data)
}
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);
}
}
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)
<?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();
}
telnyx fax-applications update \
--api-key 'My API Key' \
--id 1293384261075731499 \
--application-name fax-router \
--webhook-event-url https://example.com
curl --request PATCH \
--url https://api.telnyx.com/v2/fax_applications/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
}
}
'
{
  "data": {
    "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"
  }
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}
{
"errors": [
{
"code": "404",
"title": "Not Found",
"detail": "The requested resource does not exist"
}
]
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "The request parameters failed validation"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Identifies the resource.

Example:

"1293384261075731499"

Body

application/json

Parameters to be updated for the Fax Application

application_name
string
required

A user-assigned name to help manage the application.

Example:

"call-router"

webhook_event_url
string<uri>
required

The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.

Example:

"https://example.com"

active
boolean
default:true

Specifies whether the connection can be used.

Example:

false

anchorsite_override
enum<string>
default:Latency

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.

Available options:
Latency,
Chicago, IL,
Ashburn, VA,
San Jose, CA,
Sydney, Australia,
Amsterdam, Netherlands,
London, UK,
Toronto, Canada,
Vancouver, Canada,
Frankfurt, Germany
Example:

"Amsterdam, Netherlands"

webhook_event_failover_url
string<uri> | null
default:""

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

Example:

"https://failover.example.com"

webhook_timeout_secs
integer | null

Specifies how many seconds to wait before timing out a webhook.

Required range: 0 <= x <= 30
Example:

25

fax_email_recipient
string | null

Specifies an email address where faxes sent to this application will be forwarded to (as pdf or tiff attachments)

Example:

"user@example.com"

tags
string[]

Tags associated with the Fax Application.

Example:
["tag1", "tag2"]
inbound
object
outbound
object

Response

Successful response

data
Fax Application · object
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"
}