telnyx-account-management-java

📁 team-telnyx/telnyx-ext-agent-skills 📅 Today
4
总安装量
1
周安装量
#48022
全站排名
安装命令
npx skills add https://github.com/team-telnyx/telnyx-ext-agent-skills --skill telnyx-account-management-java

Agent 安装分布

windsurf 1
amp 1
opencode 1
cursor 1
kimi-cli 1
kiro-cli 1

Skill 文档

Telnyx Account Management – Java

Installation

// See https://github.com/team-telnyx/telnyx-java for Maven/Gradle setup

Setup

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

TelnyxClient client = TelnyxOkHttpClient.fromEnv();

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

import com.telnyx.sdk.models.managedaccounts.ManagedAccountListPage;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountListParams;

ManagedAccountListPage page = client.managedAccounts().list();

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)

import com.telnyx.sdk.models.managedaccounts.ManagedAccountCreateParams;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountCreateResponse;

ManagedAccountCreateParams params = ManagedAccountCreateParams.builder()
    .businessName("Larry's Cat Food Inc")
    .build();
ManagedAccountCreateResponse managedAccount = client.managedAccounts().create(params);

Retrieve a managed account

Retrieves the details of a single managed account.

GET /managed_accounts/{id}

import com.telnyx.sdk.models.managedaccounts.ManagedAccountRetrieveParams;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountRetrieveResponse;

ManagedAccountRetrieveResponse managedAccount = client.managedAccounts().retrieve("id");

Update a managed account

Update a single managed account.

PATCH /managed_accounts/{id}

Optional: managed_account_allow_custom_pricing (boolean)

import com.telnyx.sdk.models.managedaccounts.ManagedAccountUpdateParams;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountUpdateResponse;

ManagedAccountUpdateResponse managedAccount = client.managedAccounts().update("id");

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

import com.telnyx.sdk.models.managedaccounts.actions.ActionDisableParams;
import com.telnyx.sdk.models.managedaccounts.actions.ActionDisableResponse;

ActionDisableResponse response = client.managedAccounts().actions().disable("id");

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)

import com.telnyx.sdk.models.managedaccounts.actions.ActionEnableParams;
import com.telnyx.sdk.models.managedaccounts.actions.ActionEnableResponse;

ActionEnableResponse response = client.managedAccounts().actions().enable("id");

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)

import com.telnyx.sdk.models.managedaccounts.ManagedAccountUpdateGlobalChannelLimitParams;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountUpdateGlobalChannelLimitResponse;

ManagedAccountUpdateGlobalChannelLimitResponse response = client.managedAccounts().updateGlobalChannelLimit("id");

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

GET /managed_accounts/allocatable_global_outbound_channels

import com.telnyx.sdk.models.managedaccounts.ManagedAccountGetAllocatableGlobalOutboundChannelsParams;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountGetAllocatableGlobalOutboundChannelsResponse;

ManagedAccountGetAllocatableGlobalOutboundChannelsResponse response = client.managedAccounts().getAllocatableGlobalOutboundChannels();