api/javascript/telnyx-account-javascript/SKILL.md
Manage account balance, payments, invoices, webhooks, and view audit logs and detail records. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-account-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.
Retrieve a list of audit log entries.
GET /audit_events
// Automatically fetches more pages as needed.
for await (const auditEventListResponse of client.auditEvents.list()) {
console.log(auditEventListResponse.id);
}
GET /balance
const balance = await client.balance.retrieve();
console.log(balance.data);
Search for any detail record across the Telnyx Platform
GET /detail_records
// Automatically fetches more pages as needed.
for await (const detailRecordListResponse of client.detailRecords.list()) {
console.log(detailRecordListResponse);
}
Retrieve a paginated list of invoices.
GET /invoices
// Automatically fetches more pages as needed.
for await (const invoiceListResponse of client.invoices.list()) {
console.log(invoiceListResponse.file_id);
}
Retrieve a single invoice by its unique identifier.
GET /invoices/{id}
const invoice = await client.invoices.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(invoice.data);
Returns the payment auto recharge preferences.
GET /payments/auto_recharge_prefs
const autoRechargePrefs = await client.payment.autoRechargePrefs.list();
console.log(autoRechargePrefs.data);
Update payment auto recharge preferences.
PATCH /payments/auto_recharge_prefs
const autoRechargePref = await client.payment.autoRechargePrefs.update();
console.log(autoRechargePref.data);
List all user tags.
GET /user_tags
const userTags = await client.userTags.list();
console.log(userTags.data);
Lists webhook_deliveries for the authenticated user
GET /webhook_deliveries
// Automatically fetches more pages as needed.
for await (const webhookDeliveryListResponse of client.webhookDeliveries.list()) {
console.log(webhookDeliveryListResponse.id);
}
Provides webhook_delivery debug data, such as timestamps, delivery status and attempts.
GET /webhook_deliveries/{id}
const webhookDelivery = await client.webhookDeliveries.retrieve(
'C9C0797E-901D-4349-A33C-C2C8F31A92C2',
);
console.log(webhookDelivery.data);
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.