api/javascript/telnyx-sip-integrations-javascript/SKILL.md
Manage call recordings, media storage, Dialogflow integration, and external connections for SIP trunking. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-sip-integrations-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.
Returns a list of your call recordings.
GET /recordings
// Automatically fetches more pages as needed.
for await (const recordingResponseData of client.recordings.list()) {
console.log(recordingResponseData.id);
}
Retrieves the details of an existing call recording.
GET /recordings/{recording_id}
const recording = await client.recordings.retrieve('recording_id');
console.log(recording.data);
Permanently deletes a call recording.
DELETE /recordings/{recording_id}
const recording = await client.recordings.delete('recording_id');
console.log(recording.data);
Permanently deletes a list of call recordings.
POST /recordings/actions/delete
await client.recordings.actions.delete({
ids: ['428c31b6-7af4-4bcb-b7f5-5013ef9657c1', '428c31b6-7af4-4bcb-b7f5-5013ef9657c2'],
});
Returns a list of your recording transcriptions.
GET /recording_transcriptions
const recordingTranscriptions = await client.recordingTranscriptions.list();
console.log(recordingTranscriptions.data);
Retrieves the details of an existing recording transcription.
GET /recording_transcriptions/{recording_transcription_id}
const recordingTranscription = await client.recordingTranscriptions.retrieve(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
);
console.log(recordingTranscription.data);
Permanently deletes a recording transcription.
DELETE /recording_transcriptions/{recording_transcription_id}
const recordingTranscription = await client.recordingTranscriptions.delete(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
);
console.log(recordingTranscription.data);
Returns the information about custom storage credentials.
GET /custom_storage_credentials/{connection_id}
const customStorageCredential = await client.customStorageCredentials.retrieve('connection_id');
console.log(customStorageCredential.connection_id);
Creates a custom storage credentials configuration.
POST /custom_storage_credentials/{connection_id}
const customStorageCredential = await client.customStorageCredentials.create('connection_id', {
backend: 'gcs',
configuration: { backend: 'gcs' },
});
console.log(customStorageCredential.connection_id);
Updates a stored custom credentials configuration.
PUT /custom_storage_credentials/{connection_id}
const customStorageCredential = await client.customStorageCredentials.update('connection_id', {
backend: 'gcs',
configuration: { backend: 'gcs' },
});
console.log(customStorageCredential.connection_id);
Deletes a stored custom credentials configuration.
DELETE /custom_storage_credentials/{connection_id}
await client.customStorageCredentials.delete('connection_id');
Return details of the Dialogflow connection associated with the given CallControl connection.
GET /dialogflow_connections/{connection_id}
const dialogflowConnection = await client.dialogflowConnections.retrieve('connection_id');
console.log(dialogflowConnection.data);
Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.
POST /dialogflow_connections/{connection_id}
const dialogflowConnection = await client.dialogflowConnections.create('connection_id', {
service_account: {
type: 'bar',
project_id: 'bar',
private_key_id: 'bar',
private_key: 'bar',
client_email: 'bar',
client_id: 'bar',
auth_uri: 'bar',
token_uri: 'bar',
auth_provider_x509_cert_url: 'bar',
client_x509_cert_url: 'bar',
},
});
console.log(dialogflowConnection.data);
Updates a stored Dialogflow Connection.
PUT /dialogflow_connections/{connection_id}
const dialogflowConnection = await client.dialogflowConnections.update('connection_id', {
service_account: {
type: 'bar',
project_id: 'bar',
private_key_id: 'bar',
private_key: 'bar',
client_email: 'bar',
client_id: 'bar',
auth_uri: 'bar',
token_uri: 'bar',
auth_provider_x509_cert_url: 'bar',
client_x509_cert_url: 'bar',
},
});
console.log(dialogflowConnection.data);
Deletes a stored Dialogflow Connection.
DELETE /dialogflow_connections/{connection_id}
await client.dialogflowConnections.delete('connection_id');
This endpoint returns a list of your External Connections inside the 'data' attribute of the response.
GET /external_connections
// Automatically fetches more pages as needed.
for await (const externalConnection of client.externalConnections.list()) {
console.log(externalConnection.id);
}
Creates a new External Connection based on the parameters sent in the request.
POST /external_connections — Required: external_sip_connection, outbound
const externalConnection = await client.externalConnections.create({
external_sip_connection: 'zoom',
outbound: {},
});
console.log(externalConnection.data);
Return the details of an existing External Connection inside the 'data' attribute of the response.
GET /external_connections/{id}
const externalConnection = await client.externalConnections.retrieve('id');
console.log(externalConnection.data);
Updates settings of an existing External Connection based on the parameters of the request.
PATCH /external_connections/{id} — Required: outbound
const externalConnection = await client.externalConnections.update('id', {
outbound: { outbound_voice_profile_id: 'outbound_voice_profile_id' },
});
console.log(externalConnection.data);
Permanently deletes an External Connection.
DELETE /external_connections/{id}
const externalConnection = await client.externalConnections.delete('id');
console.log(externalConnection.data);
Returns the civic addresses and locations from Microsoft Teams.
GET /external_connections/{id}/civic_addresses
const civicAddresses = await client.externalConnections.civicAddresses.list('id');
console.log(civicAddresses.data);
Return the details of an existing Civic Address with its Locations inside the 'data' attribute of the response.
GET /external_connections/{id}/civic_addresses/{address_id}
const civicAddress = await client.externalConnections.civicAddresses.retrieve(
'318fb664-d341-44d2-8405-e6bfb9ced6d9',
{ id: 'id' },
);
console.log(civicAddress.data);
PATCH /external_connections/{id}/locations/{location_id} — Required: static_emergency_address_id
const response = await client.externalConnections.updateLocation(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{
id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
static_emergency_address_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
},
);
console.log(response.data);
Returns a list of all active phone numbers associated with the given external connection.
GET /external_connections/{id}/phone_numbers
// Automatically fetches more pages as needed.
for await (const externalConnectionPhoneNumber of client.externalConnections.phoneNumbers.list(
'id',
)) {
console.log(externalConnectionPhoneNumber.civic_address_id);
}
Return the details of a phone number associated with the given external connection.
GET /external_connections/{id}/phone_numbers/{phone_number_id}
const phoneNumber = await client.externalConnections.phoneNumbers.retrieve('1234567889', {
id: 'id',
});
console.log(phoneNumber.data);
Asynchronously update settings of the phone number associated with the given external connection.
PATCH /external_connections/{id}/phone_numbers/{phone_number_id}
const phoneNumber = await client.externalConnections.phoneNumbers.update('1234567889', {
id: 'id',
});
console.log(phoneNumber.data);
Returns a list of your Releases for the given external connection.
GET /external_connections/{id}/releases
// Automatically fetches more pages as needed.
for await (const releaseListResponse of client.externalConnections.releases.list('id')) {
console.log(releaseListResponse.tenant_id);
}
Return the details of a Release request and its phone numbers.
GET /external_connections/{id}/releases/{release_id}
const release = await client.externalConnections.releases.retrieve(
'7b6a6449-b055-45a6-81f6-f6f0dffa4cc6',
{ id: 'id' },
);
console.log(release.data);
Returns a list of your Upload requests for the given external connection.
GET /external_connections/{id}/uploads
// Automatically fetches more pages as needed.
for await (const upload of client.externalConnections.uploads.list('id')) {
console.log(upload.location_id);
}
Creates a new Upload request to Microsoft teams with the included phone numbers.
POST /external_connections/{id}/uploads — Required: number_ids
const upload = await client.externalConnections.uploads.create('id', {
number_ids: [
'3920457616934164700',
'3920457616934164701',
'3920457616934164702',
'3920457616934164703',
],
});
console.log(upload.ticket_id);
Forces a recheck of the status of all pending Upload requests for the given external connection in the background.
POST /external_connections/{id}/uploads/refresh
const response = await client.externalConnections.uploads.refreshStatus('id');
console.log(response.success);
Returns the count of all pending upload requests for the given external connection.
GET /external_connections/{id}/uploads/status
const response = await client.externalConnections.uploads.pendingCount('id');
console.log(response.data);
Return the details of an Upload request and its phone numbers.
GET /external_connections/{id}/uploads/{ticket_id}
const upload = await client.externalConnections.uploads.retrieve(
'7b6a6449-b055-45a6-81f6-f6f0dffa4cc6',
{ id: 'id' },
);
console.log(upload.data);
If there were any errors during the upload process, this endpoint will retry the upload request.
POST /external_connections/{id}/uploads/{ticket_id}/retry
const response = await client.externalConnections.uploads.retry(
'7b6a6449-b055-45a6-81f6-f6f0dffa4cc6',
{ id: 'id' },
);
console.log(response.data);
Retrieve a list of log messages for all external connections associated with your account.
GET /external_connections/log_messages
// Automatically fetches more pages as needed.
for await (const logMessageListResponse of client.externalConnections.logMessages.list()) {
console.log(logMessageListResponse.code);
}
Retrieve a log message for an external connection associated with your account.
GET /external_connections/log_messages/{id}
const logMessage = await client.externalConnections.logMessages.retrieve('id');
console.log(logMessage.log_messages);
Dismiss a log message for an external connection associated with your account.
DELETE /external_connections/log_messages/{id}
const response = await client.externalConnections.logMessages.dismiss('id');
console.log(response.success);
This endpoint will make an asynchronous request to refresh the Operator Connect integration with Microsoft Teams for the current user.
POST /operator_connect/actions/refresh
const response = await client.operatorConnect.actions.refresh();
console.log(response.message);
Returns a list of stored media files.
GET /media
const media = await client.media.list();
console.log(media.data);
Upload media file to Telnyx so it can be used with other Telnyx services
POST /media — Required: media_url
const response = await client.media.upload({ media_url: 'http://www.example.com/audio.mp3' });
console.log(response.data);
Returns the information about a stored media file.
GET /media/{media_name}
const media = await client.media.retrieve('media_name');
console.log(media.data);
Updates a stored media file.
PUT /media/{media_name}
const media = await client.media.update('media_name');
console.log(media.data);
Deletes a stored media file.
DELETE /media/{media_name}
await client.media.delete('media_name');
Downloads a stored media file.
GET /media/{media_name}/download
const response = await client.media.download('media_name');
console.log(response);
const content = await response.blob();
console.log(content);
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.