用途:该技能面向 Telnyx 经销商与企业场景,提供通过 REST API(curl)管理子账户(托管账户)与组织用户的示例,便于在脚本或自动化流程中调用。
主要能力:管理托管账户,包括列出(GET /managed_accounts,支持 filter、sort、include_cancelled_accounts 及 page[number]、page[size] 分页)、创建(POST /managed_accounts,必填 business_name,可选 email、password、rollup_billing 等)、查询单个账户(GET /managed_accounts/{id})、更新(PATCH /managed_accounts/{id})、禁用(POST /managed_accounts/{id}/actions/disable)、启用(POST /managed_accounts/{id}/actions/enable,可选 reenable_all_connections);查看与调整全局出站信道(GET /managed_accounts/allocatable_global_outbound_channels、PATCH /managed_accounts/{id}/update_global_channel_limit);组织用户管理(GET /organizations/users、GET /organizations/users/users_groups_report、GET /organizations/users/{id}、POST /organizations/users/{id}/actions/remove)。
使用方式:curl 已预装于 macOS、Linux 及 Windows 10+,设置环境变量 export TELNYX_API_KEY="YOUR_API_KEY_HERE",请求时通过 Authorization: Bearer $TELNYX_API_KEY 认证。示例中给出检查 HTTP 状态码并区分 422、429、401 等错误的处理方式。
适用场景:需要以编程方式批量维护子账户、分配全局出站信道或管理组织用户的经销商与企业用户。
限制:成为 manager account 需经 Telnyx 明确批准;部分接口仅账户管理者可用;列表接口分页需借助 meta.total_pages 判断;其他功能、收费与价格暂未提供。