Skip to main content

telnyx-account-management-javascript

Manage sub-accounts for reseller and enterprise scenarios. This skill provides JavaScript SDK examples.

소스 정보

저장소
team-telnyx/telnyx-toolkit
최근 소스 활동
2026년 2월 10일 20:41
감지된 SKILL.md 언어
영어
스타
3
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
telnyx-account-management-javascript
description
Manage sub-accounts for reseller and enterprise scenarios. This skill provides JavaScript SDK examples.
metadata
{"author":"telnyx","product":"account-management","language":"javascript","generated_by":"telnyx-ext-skills-generator"}
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. --> # Telnyx Account Management - JavaScript ## Installation ```bash npm install telnyx ``` ## Setup ```javascript 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. ## Lists accounts managed by the current user. Lists the accounts managed by the current user. `GET /managed_accounts` ```javascript // Automatically fetches more pages as needed. for await (const managedAccountListResponse of client.managedAccounts.list()) { console.log(managedAccountListResponse.id); } ``` ## Create a new managed account. Create a new managed account owned by the authenticated user. `POST /managed_accounts` — Required: `business_name` ```javascript const managedAccount = await client.managedAccounts.create({ business_name: "Larry's Cat Food Inc", }); console.log(managedAccount.data); ``` ## Retrieve a managed account Retrieves the details of a single managed account. `GET /managed_accounts/{id}` ```javascript const managedAccount = await client.managedAccounts.retrieve('id'); console.log(managedAccount.data); ``` ## Update a managed account Update a single managed account. `PATCH /managed_accounts/{id}` ```javascript const managedAccount = await client.managedAccounts.update('id'); console.log(managedAccount.data); ``` ## Disables a managed account Disables a managed account, forbidding it to use Telnyx services, including sending or receiving phone calls and SMS messages. `POST /managed_accounts/{id}/actions/disable` ```javascript const response = await client.managedAccounts.actions.disable('id'); console.log(response.data); ``` ## Enables a managed account Enables a managed account and its sub-users to use Telnyx services. `POST /managed_accounts/{id}/actions/enable` ```javascript const response = await client.managedAccounts.actions.enable('id'); console.log(response.data); ``` ## Update the amount of allocatable global outbound channels allocated to a specific managed account. `PATCH /managed_accounts/{id}/update_global_channel_limit` ```javascript const response = await client.managedAccounts.updateGlobalChannelLimit('id'); console.log(response.data); ``` ## Display information about allocatable global outbound channels for the current user. `GET /managed_accounts/allocatable_global_outbound_channels` ```javascript const response = await client.managedAccounts.getAllocatableGlobalOutboundChannels(); console.log(response.data); ```
GitHub에서 보기