Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Configure account addresses, authentication providers, IP access controls, billing groups, and integration secrets. This skill provides JavaScript SDK examples.
.claude/skills/team-telnyx-telnyx-account-access-javascript/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 146% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 118% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 291% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 306% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 209% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
bashnpm install telnyx@6.74.2
javascriptimport 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:
javascripttry { const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' }); } catch (err) { if (err instanceof Telnyx.APIConnectionError) { console.error('Network error — check connectivity and retry'); } else if (err instanceof Telnyx.RateLimitError) { // 429: rate limited — wait and retry with exponential backoff 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).
for await (const item of result) { ... } to iterate through all pages automatically.GET /access_ip_address
javascript// Automatically fetches more pages as needed. for await (const accessIPAddressResponse of client.accessIPAddress.list()) { console.log(accessIPAddressResponse.id); }
Returns: created_at (date-time), description (string), id (string), ip_address (string), source (string), status (enum: pending, added), updated_at (date-time), user_id (string)
POST /access_ip_address — Required: ip_address
Optional: description (string)
javascriptconst accessIPAddressResponse = await client.accessIPAddress.create({ ip_address: '203.0.113.10' }); console.log(accessIPAddressResponse.id);
Returns: created_at (date-time), description (string), id (string), ip_address (string), source (string), status (enum: pending, added), updated_at (date-time), user_id (string)
GET /access_ip_address/{access_ip_address_id}
javascriptconst accessIPAddressResponse = await client.accessIPAddress.retrieve('access_ip_address_id'); console.log(accessIPAddressResponse.id);
Returns: created_at (date-time), description (string), id (string), ip_address (string), source (string), status (enum: pending, added), updated_at (date-time), user_id (string)
DELETE /access_ip_address/{access_ip_address_id}
javascriptconst accessIPAddressResponse = await client.accessIPAddress.delete('access_ip_address_id'); console.log(accessIPAddressResponse.id);
Returns: created_at (date-time), description (string), id (string), ip_address (string), source (string), status (enum: pending, added), updated_at (date-time), user_id (string)
Returns a list of your addresses.
GET /addresses
javascript// Automatically fetches more pages as needed. for await (const address of client.addresses.list()) { console.log(address.id); }
Returns: address_book (boolean), administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (string), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string), validate_address (boolean)
Creates an address.
POST /addresses — Required: first_name, last_name, business_name, street_address, locality, country_code
Optional: address_book (boolean), administrative_area (string), borough (string), customer_reference (string), extended_address (string), neighborhood (string), phone_number (string), postal_code (string), validate_address (boolean)
javascriptconst address = await client.addresses.create({ business_name: "Toy-O'Kon", country_code: 'US', first_name: 'Alfred', last_name: 'Foster', locality: 'Austin', street_address: '600 Congress Avenue', }); console.log(address.data);
Returns: address_book (boolean), administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (string), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string), validate_address (boolean)
Validates an address for emergency services.
POST /addresses/actions/validate — Required: country_code, street_address, postal_code
Optional: administrative_area (string), extended_address (string), locality (string)
javascriptconst response = await client.addresses.actions.validate({ country_code: 'US', postal_code: '78701', street_address: '600 Congress Avenue', }); console.log(response.data);
Returns: errors (arrayobject]), record_type (string), result (enum: valid, invalid), suggested (object)
Retrieves the details of an existing address.
GET /addresses/{id}
javascriptconst address = await client.addresses.retrieve('550e8400-e29b-41d4-a716-446655440000'); console.log(address.data);
Returns: address_book (boolean), administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (string), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string), validate_address (boolean)
Deletes an existing address.
DELETE /addresses/{id}
javascriptconst address = await client.addresses.delete('550e8400-e29b-41d4-a716-446655440000'); console.log(address.data);
Returns: address_book (boolean), administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (string), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string), validate_address (boolean)
POST /addresses/{id}/actions/accept_suggestions
Optional: id (string)
javascriptconst response = await client.addresses.actions.acceptSuggestions( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', ); console.log(response.data);
Returns: accepted (boolean), id (uuid), record_type (enum: address_suggestion)
Returns a list of your SSO authentication providers.
GET /authentication_providers
javascript// Automatically fetches more pages as needed. for await (const authenticationProvider of client.authenticationProviders.list()) { console.log(authenticationProvider.id); }
Returns: activated_at (date-time), active (boolean), created_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (string), settings (object), short_name (string), updated_at (date-time)
Creates an authentication provider.
POST /authentication_providers — Required: name, short_name, settings
Optional: active (boolean), settings_url (uri)
javascriptconst authenticationProvider = await client.authenticationProviders.create({ name: 'Okta', settings: { idp_cert_fingerprint: '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7', idp_entity_id: 'https://myorg.myidp.com/saml/metadata', idp_sso_target_url: 'https://myorg.myidp.com/trust/saml2/http-post/sso', }, short_name: 'myorg', }); console.log(authenticationProvider.data);
Returns: activated_at (date-time), active (boolean), created_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (string), settings (object), short_name (string), updated_at (date-time)
Retrieves the details of an existing authentication provider.
GET /authentication_providers/{id}
javascriptconst authenticationProvider = await client.authenticationProviders.retrieve('550e8400-e29b-41d4-a716-446655440000'); console.log(authenticationProvider.data);
Returns: activated_at (date-time), active (boolean), created_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (string), settings (object), short_name (string), updated_at (date-time)
Updates settings of an existing authentication provider.
PATCH /authentication_providers/{id}
Optional: active (boolean), name (string), settings (object), settings_url (uri), short_name (string)
javascriptconst authenticationProvider = await client.authenticationProviders.update('id', { active: true, name: 'Okta', settings: { idp_entity_id: 'https://myorg.myidp.com/saml/metadata', idp_sso_target_url: 'https://myorg.myidp.com/trust/saml2/http-post/sso', idp_cert_fingerprint: '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7', idp_cert_fingerprint_algorithm: 'sha1', }, short_name: 'myorg', }); console.log(authenticationProvider.data);
Returns: activated_at (date-time), active (boolean), created_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (string), settings (object), short_name (string), updated_at (date-time)
Deletes an existing authentication provider.
DELETE /authentication_providers/{id}
javascriptconst authenticationProvider = await client.authenticationProviders.delete('550e8400-e29b-41d4-a716-446655440000'); console.log(authenticationProvider.data);
Returns: activated_at (date-time), active (boolean), created_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (string), settings (object), short_name (string), updated_at (date-time)
GET /billing_groups
javascript// Automatically fetches more pages as needed. for await (const billingGroup of client.billingGroups.list()) { console.log(billingGroup.id); }
Returns: created_at (date-time), deleted_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (enum: billing_group), updated_at (date-time)
POST /billing_groups
Optional: name (string)
javascriptconst billingGroup = await client.billingGroups.create({ name: 'my-resource' }); console.log(billingGroup.data);
Returns: created_at (date-time), deleted_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (enum: billing_group), updated_at (date-time)
GET /billing_groups/{id}
javascriptconst billingGroup = await client.billingGroups.retrieve('f5586561-8ff0-4291-a0ac-84fe544797bd'); console.log(billingGroup.data);
Returns: created_at (date-time), deleted_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (enum: billing_group), updated_at (date-time)
PATCH /billing_groups/{id}
Optional: name (string)
javascriptconst billingGroup = await client.billingGroups.update('f5586561-8ff0-4291-a0ac-84fe544797bd', { name: 'my-resource', }); console.log(billingGroup.data);
Returns: created_at (date-time), deleted_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (enum: billing_group), updated_at (date-time)
DELETE /billing_groups/{id}
javascriptconst billingGroup = await client.billingGroups.delete('f5586561-8ff0-4291-a0ac-84fe544797bd'); console.log(billingGroup.data);
Returns: created_at (date-time), deleted_at (date-time), id (uuid), name (string), organization_id (uuid), record_type (enum: billing_group), updated_at (date-time)
Retrieve a list of all integration secrets configured by the user.
GET /integration_secrets
javascript// Automatically fetches more pages as needed. for await (const integrationSecret of client.integrationSecrets.list()) { console.log(integrationSecret.id); }
Returns: created_at (date-time), id (string), identifier (string), record_type (string), updated_at (date-time)
Create a new secret with an associated identifier that can be used to securely integrate with other services.
POST /integration_secrets — Required: identifier, type
Optional: password (string), token (string), username (string)
javascriptconst integrationSecret = await client.integrationSecrets.create({ identifier: 'my_secret', type: 'bearer', token: 'my_secret_value', }); console.log(integrationSecret.data);
Returns: created_at (date-time), id (string), identifier (string), record_type (string), updated_at (date-time)
Delete an integration secret given its ID.
DELETE /integration_secrets/{id}
javascriptawait client.integrationSecrets.delete('550e8400-e29b-41d4-a716-446655440000');
Create an Access Token (JWT) for the credential.
POST /telephony_credentials/{id}/token
javascriptconst response = await client.telephonyCredentials.createToken('550e8400-e29b-41d4-a716-446655440000'); console.log(response);
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,088 | 7,697 | -41% | 1 | 1 | 0% | 2,547 | 6,260 | +146% | 0 | 0 | — |
case-02 | fail→pass | 15,053 | 7,865 | -48% | 1 | 1 | 0% | 2,919 | 6,372 | +118% | 0 | 0 | — |
case-03 | fail→pass | 7,273 | 5,695 | -22% | 1 | 1 | 0% | 1,505 | 5,883 | +291% | 0 | 0 | — |
case-04 | fail→fail | 10,897 | 7,070 | -35% | 1 | 1 | 0% | 2,013 | 5,986 | +197% | 0 | 0 | — |
case-05 | fail→fail | 9,809 | 6,249 | -36% | 1 | 1 | 0% | 1,835 | 5,891 | +221% | 0 | 0 | — |
case-06 | fail→fail | 11,854 | 7,061 | -40% | 1 | 1 | 0% | 2,530 | 6,023 | +138% | 0 | 0 | — |
case-07 | fail→pass | 6,506 | 2,083 | -68% | 1 | 1 | 0% | 1,244 | 5,056 | +306% | 0 | 0 | — |
case-08 | fail→pass | 8,401 | 3,320 | -60% | 1 | 1 | 0% | 1,709 | 5,283 | +209% | 0 | 0 | — |
case-09 | pass→pass | 7,716 | 3,682 | -52% | 1 | 1 | 0% | 1,466 | 5,380 | +267% | 0 | 0 | — |
case-10 | pass→pass | 7,197 | 4,382 | -39% | 1 | 1 | 0% | 1,444 | 5,492 | +280% | 0 | 0 | — |
case-11 | pass→pass | 8,209 | 2,639 | -68% | 1 | 1 | 0% | 1,636 | 5,201 | +218% | 0 | 0 | — |
case-12 | fail→pass | 7,983 | 2,956 | -63% | 1 | 1 | 0% | 1,392 | 5,177 | +272% | 0 | 0 | — |
case-13 | fail→pass | 11,704 | 4,819 | -59% | 1 | 1 | 0% | 2,136 | 5,699 | +167% | 0 | 0 | — |
case-14 | fail→pass | 9,570 | 3,777 | -61% | 1 | 1 | 0% | 1,871 | 5,464 | +192% | 0 | 0 | — |
case-15 | fail→pass | 7,915 | 3,385 | -57% | 1 | 1 | 0% | 1,477 | 5,360 | +263% | 0 | 0 | — |
case-16 | fail→pass | 7,375 | 2,921 | -60% | 1 | 1 | 0% | 1,366 | 5,186 | +280% | 0 | 0 | — |
case-17 | pass→pass | 9,382 | 5,309 | -43% | 1 | 1 | 0% | 1,633 | 5,751 | +252% | 0 | 0 | — |
case-18 | fail→pass | 8,722 | 2,503 | -71% | 1 | 1 | 0% | 1,682 | 5,067 | +201% | 0 | 0 | — |
case-19 | pass→pass | 9,385 | 4,025 | -57% | 1 | 1 | 0% | 1,846 | 5,460 | +196% | 0 | 0 | — |
case-20 | fail→pass | 6,169 | 2,455 | -60% | 1 | 1 | 0% | 1,260 | 5,175 | +311% | 0 | 0 | — |
case-21 | pass→pass | 4,899 | 3,180 | -35% | 1 | 1 | 0% | 837 | 5,224 | +524% | 0 | 0 | — |
case-22 | fail→pass | 9,099 | 4,038 | -56% | 1 | 1 | 0% | 1,818 | 5,425 | +198% | 0 | 0 | — |
case-23 | fail→pass | 7,668 | 2,232 | -71% | 1 | 1 | 0% | 1,412 | 5,061 | +258% | 0 | 0 | — |
case-24 | pass→pass | 10,449 | 4,918 | -53% | 1 | 1 | 0% | 1,951 | 5,684 | +191% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +58 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.