>- Search, order, and manage phone numbers by location, features, and coverage.
npx skills add https://github.com/team-telnyx/ai --skill telnyx-numbers-javascript
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
npm install [email protected]
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.
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
try {
const availablePhoneNumbers = await client.availablePhoneNumbers.list();
} catch (err) {
if (err instanceof Telnyx.APIConnectionError) {
console.error('Network error — check connectivity and retry');
} else if (err instanceof Telnyx.RateLimitError) {
const retryAfter = err.headers?.['retry-after'] || 1;
await new Promise(r => setTimeout(r, retryAfter * 1000));
} else if (err instanceof Telnyx.APIError) {
console.error(`API error ${err.status}: ${err.message}`);
if (err.status === 422) {
console.error('Validation error — check required fields and formats');
}
}
}
Common error codes: 401 invalid API key, 403 insufficient permissions,
404 resource not found, 422 validation error (check field formats),
429 rate limited (retry with exponential backoff).
+13125550001). Include the + prefix and country code. No spaces, dashes, or parentheses.for await (const item of result) { ... } to iterate through all pages automatically.Do not invent Telnyx parameters, enums, response fields, or webhook fields.
## Additional Operations, read the optional-parameters section and the response-schemas section.Number search is the entrypoint for provisioning. Agents need the search method, key query filters, and the fields returned for candidate numbers.
client.availablePhoneNumbers.list() — GET /available_phone_numbers
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| filter | object | No | Consolidated filter parameter (deepObject style). |
const availablePhoneNumbers = await client.availablePhoneNumbers.list();
console.log(availablePhoneNumbers.data);
Response wrapper:
availablePhoneNumbers.dataavailablePhoneNumbers.metaPrimary item fields:
phoneNumberrecordTypequickshipreservablebestEffortcostInformationNumber ordering is the production provisioning step after number selection.
client.numberOrders.create() — POST /number_orders
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| phone_numbers | array[object] | Yes | |
| connection_id | string (UUID) | No | Identifies the connection associated with this phone number. |
| messaging_profile_id | string (UUID) | No | Identifies the messaging profile associated with the phone n... |
| billing_group_id | string (UUID) | No | Identifies the billing group associated with the phone numbe... |
| ... | | | +1 optional params in references/api-details.md |
const numberOrder = await client.numberOrders.create({
phone_numbers: [{"phone_number": "+18005550101"}],
});
console.log(numberOrder.data);
Primary response fields:
numberOrder.data.idnumberOrder.data.statusnumberOrder.data.phoneNumbersCountnumberOrder.data.requirementsMetnumberOrder.data.messagingProfileIdnumberOrder.data.connectionIdOrder status determines whether provisioning completed or additional requirements are still blocking fulfillment.
client.numberOrders.retrieve() — GET /number_orders/{number_order_id}
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| number_order_id | string (UUID) | Yes | The number order ID. |
const numberOrder = await client.numberOrders.retrieve('550e8400-e29b-41d4-a716-446655440000');
console.log(numberOrder.data);
Primary response fields:
numberOrder.data.idnumberOrder.data.statusnumberOrder.data.requirementsMetnumberOrder.data.phoneNumbersCountnumberOrder.data.phoneNumbersnumberOrder.data.connectionIdUse these when the core tasks above are close to your flow, but you need a common variation or follow-up step.
Create or provision an additional resource when the core tasks do not cover this flow.
client.numberReservations.create() — POST /number_reservations
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| phone_numbers | array[object] | Yes | |
| status | enum (pending, success, failure) | No | The status of the entire reservation. |
| id | string (UUID) | No | |
| record_type | string | No | |
| ... | | | +3 optional params in references/api-details.md |
const numberReservation = await client.numberReservations.create({
phone_numbers: [{"phone_number": "+18005550101"}],
});
console.log(numberReservation.data);
Primary response fields:
numberReservation.data.idnumberReservation.data.statusnumberReservation.data.createdAtnumberReservation.data.updatedAtnumberReservation.data.customerReferencenumberReservation.data.errorsFetch the current state before updating, deleting, or making control-flow decisions.
client.numberReservations.retrieve() — GET /number_reservations/{number_reservation_id}
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| number_reservation_id | string (UUID) | Yes | The number reservation ID. |
const numberReservation = await client.numberReservations.retrieve('550e8400-e29b-41d4-a716-446655440000');
console.log(numberReservation.data);
Primary response fields:
numberReservation.data.idnumberReservation.data.statusnumberReservation.data.createdAtnumberReservation.data.updatedAtnumberReservation.data.customerReferencenumberReservation.data.errorsInspect available resources or choose an existing resource before mutating it.
client.advancedOrders.list() — GET /advanced_orders
const advancedOrders = await client.advancedOrders.list();
console.log(advancedOrders.data);
Response wrapper:
advancedOrders.dataPrimary item fields:
idstatusareaCodecommentscountryCodecustomerReferenceCreate or provision an additional resource when the core tasks do not cover this flow.
client.advancedOrders.create() — POST /advanced_orders
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| phone_number_type | enum (local, mobile, toll_free, shared_cost, national, ...) | No | |
| requirement_group_id | string (UUID) | No | The ID of the requirement group to associate with this advan... |
| country_code | string (ISO 3166-1 alpha-2) | No | |
| ... | | | +5 optional params in references/api-details.md |
const advancedOrder = await client.advancedOrders.create();
console.log(advancedOrder.id);
Primary response fields:
advancedOrder.idadvancedOrder.statusadvancedOrder.areaCodeadvancedOrder.commentsadvancedOrder.countryCodeadvancedOrder.customerReferenceModify an existing resource without recreating it.
client.advancedOrders.updateRequirementGroup() — PATCH /advanced_orders/{advanced-order-id}/requirement_group
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| advanced-order-id | string (UUID) | Yes | Unique identifier of the advanced order. |
| phone_number_type | enum (local, mobile, toll_free, shared_cost, national, ...) | No | |
| requirement_group_id | string (UUID) | No | The ID of the requirement group to associate with this advan... |
| country_code | string (ISO 3166-1 alpha-2) | No | |
| ... | | | +5 optional params in references/api-details.md |
const response = await client.advancedOrders.updateRequirementGroup(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(response.id);
Primary response fields:
response.idresponse.statusresponse.areaCoderesponse.commentsresponse.countryCoderesponse.customerReferenceFetch the current state before updating, deleting, or making control-flow decisions.
client.advancedOrders.retrieve() — GET /advanced_orders/{order_id}
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| order_id | string (UUID) | Yes | Unique identifier of the order. |
const advancedOrder = await client.advancedOrders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(advancedOrder.id);
Primary response fields:
advancedOrder.idadvancedOrder.statusadvancedOrder.areaCodeadvancedOrder.commentsadvancedOrder.countryCodeadvancedOrder.customerReferenceInspect available resources or choose an existing resource before mutating it.
client.availablePhoneNumberBlocks.list() — GET /available_phone_number_blocks
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| filter | object | No | Consolidated filter parameter (deepObject style). |
const availablePhoneNumberBlocks = await client.availablePhoneNumberBlocks.list();
console.log(availablePhoneNumberBlocks.data);
Response wrapper:
availablePhoneNumberBlocks.dataavailablePhoneNumberBlocks.metaPrimary item fields:
phoneNumbercostInformationfeaturesrangerecordTyperegionInformationInspect available resources or choose an existing resource before mutating it.
client.comments.list() — GET /comments
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| filter | object | No | Consolidated filter parameter (deepObject style). |
const comments = await client.comments.list();
console.log(comments.data);
Response wrapper:
comments.datacomments.metaPrimary item fields:
idbodycreatedAtupdatedAtcommentRecordIdcommentRecordTypeUse the core tasks above first. The operations below are indexed here with exact SDK methods and required params; use references/api-details.md for full optional params, response schemas, and lower-frequency webhook payloads.
Before using any operation below, read the optional-parameters section and the response-schemas section so you do not guess missing fields.
| Operation | SDK method | Endpoint | Use when | Required params |
|-----------|------------|----------|----------|-----------------|
| Create a comment | client.comments.create() | POST /comments | Create or provision an additional resource when the core tasks do not cover this flow. | None |
| Retrieve a comment | client.comments.retrieve() | GET /comments/{id} | Fetch the current state before updating, deleting, or making control-flow decisions. | id |
| Mark a comment as read | client.comments.markAsRead() | PATCH /comments/{id}/read | Modify an existing resource without recreating it. | id |
| Get country coverage | client.countryCoverage.retrieve() | GET /country_coverage | Inspect available resources or choose an existing resource before mutating it. | None |
| Get coverage for a specific country | client.countryCoverage.retrieveCountry() | GET /country_coverage/countries/{country_code} | Fetch the current state before updating, deleting, or making control-flow decisions. | country_code |
| List customer service records | client.customerServiceRecords.list() | GET /customer_service_records | Inspect available resources or choose an existing resource before mutating it. | None |
| Create a customer service record | client.customerServiceRecords.create() | POST /customer_service_records | Create or provision an additional resource when the core tasks do not cover this flow. | None |
| Verify CSR phone number coverage | client.customerServiceRecords.verifyPhoneNumberCoverage() | POST /customer_service_records/phone_number_coverages | Create or provision an additional resource when the core tasks do not cover this flow. | None |
| Get a customer service record | client.customerServiceRecords.retrieve() | GET /customer_service_records/{customer_service_record_id} | Fetch the current state before updating, deleting, or making control-flow decisions. | customer_service_record_id |
| List inexplicit number orders | client.inexplicitNumberOrders.list() | GET /inexplicit_number_orders | Inspect available resources or choose an existing resource before mutating it. | None |
| Create an inexplicit number order | client.inexplicitNumberOrders.create() | POST /inexplicit_number_orders | Create or provision an additional resource when the core tasks do not cover this flow. | ordering_groups |
| Retrieve an inexplicit number order | client.inexplicitNumberOrders.retrieve() | GET /inexplicit_number_orders/{id} | Fetch the current state before updating, deleting, or making control-flow decisions. | id |
| Create an inventory coverage request | client.inventoryCoverage.list() | GET /inventory_coverage | Inspect available resources or choose an existing resource before mutating it. | None |
| List mobile network operators | client.mobileNetworkOperators.list() | GET /mobile_network_operators | Inspect available resources or choose an existing resource before mutating it. | None |
| List network coverage locations | client.networkCoverage.list() | GET /network_coverage | Inspect available resources or choose an existing resource before mutating it. | None |
| List number block orders | client.numberBlockOrders.list() | GET /number_block_orders | Inspect available resources or choose an existing resource before mutating it. | None |
| Create a number block order | client.numberBlockOrders.create() | POST /number_block_orders | Create or provision an additional resource when the core tasks do not cover this flow. | starting_number, range |
| Retrieve a number block order | client.numberBlockOrders.retrieve() | GET /number_block_orders/{number_block_order_id} | Fetch the current state before updating, deleting, or making control-flow decisions. | number_block_order_id |
| Retrieve a list of phone numbers associated to orders | client.numberOrderPhoneNumbers.list() | GET /number_order_phone_numbers | Inspect available resources or choose an existing resource before mutating it. | None |
| Retrieve a single phone number within a number order. | client.numberOrderPhoneNumbers.retrieve() | GET /number_order_phone_numbers/{number_order_phone_number_id} | Fetch the current state before updating, deleting, or making control-flow decisions. | number_order_phone_number_id |
| Update requirements for a single phone number within a number order. | client.numberOrderPhoneNumbers.updateRequirements() | PATCH /number_order_phone_numbers/{number_order_phone_number_id} | Modify an existing resource without recreating it. | number_order_phone_number_id |
| List number orders | client.numberOrders.list() | GET /number_orders | Create or inspect provisioning orders for number purchases. | None |
| Update a number order | client.numberOrders.update() | PATCH /number_orders/{number_order_id} | Modify an existing resource without recreating it. | number_order_id |
| List number reservations | client.numberReservations.list() | GET /number_reservations | Inspect available resources or choose an existing resource before mutating it. | None |
| Extend a number reservation | client.numberReservations.actions.extend() | POST /number_reservations/{number_reservation_id}/actions/extend | Trigger a follow-up action in an existing workflow rather than creating a new top-level resource. | number_reservation_id |
| Retrieve the features for a list of numbers | client.numbersFeatures.create() | POST /numbers_features | Create or provision an additional resource when the core tasks do not cover this flow. | phone_numbers |
| Lists the phone number blocks jobs | client.phoneNumberBlocks.jobs.list() | GET /phone_number_blocks/jobs | Inspect available resources or choose an existing resource before mutating it. | None |
| Deletes all numbers associated with a phone number block | client.phoneNumberBlocks.jobs.deletePhoneNumberBlock() | POST /phone_number_blocks/jobs/delete_phone_number_block | Create or provision an additional resource when the core tasks do not cover this flow. | phone_number_block_id |
| Retrieves a phone number blocks job | client.phoneNumberBlocks.jobs.retrieve() | GET /phone_number_blocks/jobs/{id} | Fetch the current state before updating, deleting, or making control-flow decisions. | id |
| List sub number orders | client.subNumberOrders.list() | GET /sub_number_orders | Inspect available resources or choose an existing resource before mutating it. | None |
| Retrieve a sub number order | client.subNumberOrders.retrieve() | GET /sub_number_orders/{sub_number_order_id} | Fetch the current state before updating, deleting, or making control-flow decisions. | sub_number_order_id |
| Update a sub number order's requirements | client.subNumberOrders.update() | PATCH /sub_number_orders/{sub_number_order_id} | Modify an existing resource without recreating it. | sub_number_order_id |
| Cancel a sub number order | client.subNumberOrders.cancel() | PATCH /sub_number_orders/{sub_number_order_id}/cancel | Modify an existing resource without recreating it. | sub_number_order_id |
| Create a sub number orders report | client.subNumberOrdersReport.create() | POST /sub_number_orders_report | Create or provision an additional resource when the core tasks do not cover this flow. | None |
| Retrieve a sub number orders report | client.subNumberOrdersReport.retrieve() | GET /sub_number_orders_report/{report_id} | Fetch the current state before updating, deleting, or making control-flow decisions. | report_id |
| Download a sub number orders report | client.subNumberOrdersReport.download() | GET /sub_number_orders_report/{report_id}/download | Fetch the current state before updating, deleting, or making control-flow decisions. | report_id |
| Event | data.event_type | Description |
|-------|-------------------|-------------|
| numberOrderStatusUpdate | number.order.status.update | Number Order Status Update |
For exhaustive optional parameters, full response schemas, and complete webhook payloads, see references/api-details.md.
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take team-telnyx/telnyx-numbers-javascript from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.