api/javascript/telnyx-messaging-profiles-javascript/SKILL.md
Create and manage messaging profiles with number pools, sticky sender, and geomatch features. Configure short codes for high-volume messaging. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-messaging-profiles-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.
GET /messaging_profiles
// Automatically fetches more pages as needed.
for await (const messagingProfile of client.messagingProfiles.list()) {
console.log(messagingProfile.id);
}
POST /messaging_profiles — Required: name, whitelisted_destinations
const messagingProfile = await client.messagingProfiles.create({
name: 'My name',
whitelisted_destinations: ['US'],
});
console.log(messagingProfile.data);
GET /messaging_profiles/{id}
const messagingProfile = await client.messagingProfiles.retrieve(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(messagingProfile.data);
PATCH /messaging_profiles/{id}
const messagingProfile = await client.messagingProfiles.update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(messagingProfile.data);
DELETE /messaging_profiles/{id}
const messagingProfile = await client.messagingProfiles.delete(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(messagingProfile.data);
GET /messaging_profiles/{id}/phone_numbers
// Automatically fetches more pages as needed.
for await (const phoneNumberWithMessagingSettings of client.messagingProfiles.listPhoneNumbers(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
)) {
console.log(phoneNumberWithMessagingSettings.id);
}
GET /messaging_profiles/{id}/short_codes
// Automatically fetches more pages as needed.
for await (const shortCode of client.messagingProfiles.listShortCodes(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
)) {
console.log(shortCode.messaging_profile_id);
}
GET /messaging_profiles/{profile_id}/autoresp_configs
const autorespConfigs = await client.messagingProfiles.autorespConfigs.list(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(autorespConfigs.data);
POST /messaging_profiles/{profile_id}/autoresp_configs — Required: op, keywords, country_code
const autoRespConfigResponse = await client.messagingProfiles.autorespConfigs.create('profile_id', {
country_code: 'US',
keywords: ['keyword1', 'keyword2'],
op: 'start',
});
console.log(autoRespConfigResponse.data);
GET /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}
const autoRespConfigResponse = await client.messagingProfiles.autorespConfigs.retrieve(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ profile_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
);
console.log(autoRespConfigResponse.data);
PUT /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id} — Required: op, keywords, country_code
const autoRespConfigResponse = await client.messagingProfiles.autorespConfigs.update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{
profile_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
country_code: 'US',
keywords: ['keyword1', 'keyword2'],
op: 'start',
},
);
console.log(autoRespConfigResponse.data);
DELETE /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}
const autorespConfig = await client.messagingProfiles.autorespConfigs.delete(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ profile_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
);
console.log(autorespConfig);
GET /short_codes
// Automatically fetches more pages as needed.
for await (const shortCode of client.shortCodes.list()) {
console.log(shortCode.messaging_profile_id);
}
GET /short_codes/{id}
const shortCode = await client.shortCodes.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(shortCode.data);
Update the settings for a specific short code.
PATCH /short_codes/{id} — Required: messaging_profile_id
const shortCode = await client.shortCodes.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
messaging_profile_id: 'abc85f64-5717-4562-b3fc-2c9600000000',
});
console.log(shortCode.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.