telnyx-account-management-python

📁 team-telnyx/telnyx-ext-agent-skills 📅 3 days ago
3
总安装量
3
周安装量
#57540
全站排名
安装命令
npx skills add https://github.com/team-telnyx/telnyx-ext-agent-skills --skill telnyx-account-management-python

Agent 安装分布

opencode 3
gemini-cli 3
antigravity 3
claude-code 3
windsurf 3
github-copilot 3

Skill 文档

Telnyx Account Management – Python

Installation

pip install telnyx

Setup

import os
from telnyx import Telnyx

client = Telnyx(
    api_key=os.environ.get("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

page = client.managed_accounts.list()
page = page.data[0]
print(page.id)

Create a new managed account.

Create a new managed account owned by the authenticated user.

POST /managed_accounts — Required: business_name

Optional: email (string), managed_account_allow_custom_pricing (boolean), password (string), rollup_billing (boolean)

managed_account = client.managed_accounts.create(
    business_name="Larry's Cat Food Inc",
)
print(managed_account.data)

Retrieve a managed account

Retrieves the details of a single managed account.

GET /managed_accounts/{id}

managed_account = client.managed_accounts.retrieve(
    "id",
)
print(managed_account.data)

Update a managed account

Update a single managed account.

PATCH /managed_accounts/{id}

Optional: managed_account_allow_custom_pricing (boolean)

managed_account = client.managed_accounts.update(
    id="id",
)
print(managed_account.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

response = client.managed_accounts.actions.disable(
    "id",
)
print(response.data)

Enables a managed account

Enables a managed account and its sub-users to use Telnyx services.

POST /managed_accounts/{id}/actions/enable

Optional: reenable_all_connections (boolean)

response = client.managed_accounts.actions.enable(
    id="id",
)
print(response.data)

Update the amount of allocatable global outbound channels allocated to a specific managed account.

PATCH /managed_accounts/{id}/update_global_channel_limit

Optional: channel_limit (integer)

response = client.managed_accounts.update_global_channel_limit(
    id="id",
)
print(response.data)

Display information about allocatable global outbound channels for the current user.

GET /managed_accounts/allocatable_global_outbound_channels

response = client.managed_accounts.get_allocatable_global_outbound_channels()
print(response.data)