api/javascript/telnyx-fax-javascript/SKILL.md
Send and receive faxes programmatically. Manage fax applications and media. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-fax-javascriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
npm install telnyx
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
All examples below assume client is already initialized as shown above.
This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response.
GET /fax_applications
// Automatically fetches more pages as needed.
for await (const faxApplication of client.faxApplications.list()) {
console.log(faxApplication.id);
}
Creates a new Fax Application based on the parameters sent in the request.
POST /fax_applications — Required: application_name, webhook_event_url
const faxApplication = await client.faxApplications.create({
application_name: 'fax-router',
webhook_event_url: 'https://example.com',
});
console.log(faxApplication.data);
Return the details of an existing Fax Application inside the 'data' attribute of the response.
GET /fax_applications/{id}
const faxApplication = await client.faxApplications.retrieve('1293384261075731499');
console.log(faxApplication.data);
Updates settings of an existing Fax Application based on the parameters of the request.
PATCH /fax_applications/{id} — Required: application_name, webhook_event_url
const faxApplication = await client.faxApplications.update('1293384261075731499', {
application_name: 'fax-router',
webhook_event_url: 'https://example.com',
});
console.log(faxApplication.data);
Permanently deletes a Fax Application.
DELETE /fax_applications/{id}
const faxApplication = await client.faxApplications.delete('1293384261075731499');
console.log(faxApplication.data);
GET /faxes
// Automatically fetches more pages as needed.
for await (const fax of client.faxes.list()) {
console.log(fax.id);
}
Send a fax.
POST /faxes — Required: connection_id, from, to
const fax = await client.faxes.create({
connection_id: '234423',
from: '+13125790015',
to: '+13127367276',
});
console.log(fax.data);
GET /faxes/{id}
const fax = await client.faxes.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(fax.data);
DELETE /faxes/{id}
await client.faxes.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
Cancel the outbound fax that is in one of the following states: queued, media.processed, originated or sending
POST /faxes/{id}/actions/cancel
const response = await client.faxes.actions.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);
Refreshes the inbound fax's media_url when it has expired
POST /faxes/{id}/actions/refresh
const response = await client.faxes.actions.refresh('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);
The following webhook events are sent to your configured webhook URL.
All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for verification (Standard Webhooks compatible).
| Event | Description |
|-------|-------------|
| fax.delivered | Fax Delivered |
| fax.failed | Fax Failed |
| fax.media.processed | Fax Media Processed |
| fax.queued | Fax Queued |
| fax.sending.started | Fax Sending Started |
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.