api/javascript/telnyx-numbers-compliance-javascript/SKILL.md
Manage regulatory requirements, number bundles, supporting documents, and verified numbers for compliance. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-numbers-compliance-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 all allowed bundles.
GET /bundle_pricing/billing_bundles
// Automatically fetches more pages as needed.
for await (const billingBundleSummary of client.bundlePricing.billingBundles.list()) {
console.log(billingBundleSummary.id);
}
Get a single bundle by ID.
GET /bundle_pricing/billing_bundles/{bundle_id}
const billingBundle = await client.bundlePricing.billingBundles.retrieve(
'8661948c-a386-4385-837f-af00f40f111a',
);
console.log(billingBundle.data);
Get a paginated list of user bundles.
GET /bundle_pricing/user_bundles
// Automatically fetches more pages as needed.
for await (const userBundle of client.bundlePricing.userBundles.list()) {
console.log(userBundle.id);
}
Creates multiple user bundles for the user.
POST /bundle_pricing/user_bundles/bulk
const userBundle = await client.bundlePricing.userBundles.create();
console.log(userBundle.data);
Returns all user bundles that aren't in use.
GET /bundle_pricing/user_bundles/unused
const response = await client.bundlePricing.userBundles.listUnused();
console.log(response.data);
Retrieves a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}
const userBundle = await client.bundlePricing.userBundles.retrieve(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
);
console.log(userBundle.data);
Deactivates a user bundle by its ID.
DELETE /bundle_pricing/user_bundles/{user_bundle_id}
const response = await client.bundlePricing.userBundles.deactivate(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
);
console.log(response.data);
Retrieves the resources of a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}/resources
const response = await client.bundlePricing.userBundles.listResources(
'ca1d2263-d1f1-43ac-ba53-248e7a4bb26a',
);
console.log(response.data);
List all documents links ordered by created_at descending.
GET /document_links
// Automatically fetches more pages as needed.
for await (const documentLinkListResponse of client.documentLinks.list()) {
console.log(documentLinkListResponse.id);
}
List all documents ordered by created_at descending.
GET /documents
// Automatically fetches more pages as needed.
for await (const docServiceDocument of client.documents.list()) {
console.log(docServiceDocument.id);
}
Upload a document.<br /><br />Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.
POST /documents
const response = await client.documents.uploadJson({ document: {} });
console.log(response.data);
Retrieve a document.
GET /documents/{id}
const document = await client.documents.retrieve('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(document.data);
Update a document.
PATCH /documents/{id}
const document = await client.documents.update('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(document.data);
Delete a document.<br /><br />A document can only be deleted if it's not linked to a service.
DELETE /documents/{id}
const document = await client.documents.delete('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(document.data);
Download a document.
GET /documents/{id}/download
const response = await client.documents.download('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(response);
const content = await response.blob();
console.log(content);
Generates a temporary pre-signed URL that can be used to download the document directly from the storage backend without authentication.
GET /documents/{id}/download_link
const response = await client.documents.generateDownloadLink(
'550e8400-e29b-41d4-a716-446655440000',
);
console.log(response.data);
List all requirements with filtering, sorting, and pagination
GET /requirements
// Automatically fetches more pages as needed.
for await (const requirementListResponse of client.requirements.list()) {
console.log(requirementListResponse.id);
}
Retrieve a document requirement record
GET /requirements/{id}
const requirement = await client.requirements.retrieve('a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa');
console.log(requirement.data);
List all requirement types ordered by created_at descending
GET /requirement_types
const requirementTypes = await client.requirementTypes.list();
console.log(requirementTypes.data);
Retrieve a requirement type by id
GET /requirement_types/{id}
const requirementType = await client.requirementTypes.retrieve(
'a38c217a-8019-48f8-bff6-0fdd9939075b',
);
console.log(requirementType.data);
GET /regulatory_requirements
const regulatoryRequirement = await client.regulatoryRequirements.retrieve();
console.log(regulatoryRequirement.data);
GET /requirement_groups
const requirementGroups = await client.requirementGroups.list();
console.log(requirementGroups);
POST /requirement_groups — Required: country_code, phone_number_type, action
const requirementGroup = await client.requirementGroups.create({
action: 'ordering',
country_code: 'US',
phone_number_type: 'local',
});
console.log(requirementGroup.id);
GET /requirement_groups/{id}
const requirementGroup = await client.requirementGroups.retrieve('id');
console.log(requirementGroup.id);
PATCH /requirement_groups/{id}
const requirementGroup = await client.requirementGroups.update('id');
console.log(requirementGroup.id);
DELETE /requirement_groups/{id}
const requirementGroup = await client.requirementGroups.delete('id');
console.log(requirementGroup.id);
POST /requirement_groups/{id}/submit_for_approval
const requirementGroup = await client.requirementGroups.submitForApproval('id');
console.log(requirementGroup.id);
Gets a paginated list of Verified Numbers.
GET /verified_numbers
// Automatically fetches more pages as needed.
for await (const verifiedNumber of client.verifiedNumbers.list()) {
console.log(verifiedNumber.phone_number);
}
Initiates phone number verification procedure.
POST /verified_numbers — Required: phone_number, verification_method
const verifiedNumber = await client.verifiedNumbers.create({
phone_number: '+15551234567',
verification_method: 'sms',
});
console.log(verifiedNumber.phone_number);
GET /verified_numbers/{phone_number}
const verifiedNumberDataWrapper = await client.verifiedNumbers.retrieve('+15551234567');
console.log(verifiedNumberDataWrapper.data);
DELETE /verified_numbers/{phone_number}
const verifiedNumberDataWrapper = await client.verifiedNumbers.delete('+15551234567');
console.log(verifiedNumberDataWrapper.data);
POST /verified_numbers/{phone_number}/actions/verify — Required: verification_code
const verifiedNumberDataWrapper = await client.verifiedNumbers.actions.submitVerificationCode(
'+15551234567',
{ verification_code: '123456' },
);
console.log(verifiedNumberDataWrapper.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.