Skip to main content
POST
/
fax_applications
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const faxApplication = await client.faxApplications.create({
  application_name: 'fax-router',
  webhook_event_url: 'https://example.com',
});

console.log(faxApplication.data);
{
  "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"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Parameters that can be set when creating a 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

tags
string[]

Tags associated with the Fax Application.

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

Response

Successful response

data
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"
}