Update a Fax Application
Updates settings of an existing Fax Application based on the parameters of the request.
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: '[email protected]',
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.comcurl --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": [
{
"detail": "A previous update to this connection is still in progress. Please try again later."
}
]
}{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "The request parameters failed validation"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifies the resource.
"1293384261075731499"
Body
Parameters to be updated for the Fax Application
A user-assigned name to help manage the application.
"call-router"
The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.
"https://example.com"
Specifies whether the connection can be used.
false
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.
Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany "Amsterdam, Netherlands"
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'.
"https://failover.example.com"
Specifies how many seconds to wait before timing out a webhook.
0 <= x <= 3025
Specifies an email address where faxes sent to this application will be forwarded to (as pdf or tiff attachments)
Tags associated with the Fax Application.
["tag1", "tag2"]
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
{
"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"
}
Was this page helpful?
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: '[email protected]',
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.comcurl --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": [
{
"detail": "A previous update to this connection is still in progress. Please try again later."
}
]
}{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "The request parameters failed validation"
}
]
}