Enables a managed account
Enables a managed account and its sub-users to use Telnyx services.
POST
/
managed_accounts
/
{id}
/
actions
/
enable
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.managedAccounts.actions.enable('id');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.managed_accounts.actions.enable(
id="id",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.ManagedAccounts.Actions.Enable(
context.TODO(),
"id",
telnyx.ManagedAccountActionEnableParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.managedaccounts.actions.ActionEnableParams;
import com.telnyx.sdk.models.managedaccounts.actions.ActionEnableResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionEnableResponse response = client.managedAccounts().actions().enable("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.managed_accounts.actions.enable("id")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->managedAccounts->actions->enable(
'id', reenableAllConnections: true
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx managed-accounts:actions enable \
--api-key 'My API Key' \
--id idcurl --request POST \
--url https://api.telnyx.com/v2/managed_accounts/{id}/actions/enable \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reenable_all_connections": true
}
'{
"data": {
"record_type": "managed_account",
"id": "f65ceda4-6522-4ad6-aede-98de83385123",
"email": "user@example.com",
"api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
"api_user": "managed_account@example.com",
"api_token": "x6oexQNHTs-fZ7-QsDMOeg",
"manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"organization_name": "Example Company LLC",
"balance": {
"record_type": "balance",
"balance": "300.00",
"credit_limit": "100.00",
"available_credit": "400.00",
"currency": "USD"
},
"managed_account_allow_custom_pricing": true,
"rollup_billing": false
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Managed Account User ID
Body
application/json
Additional parameters for what to do when enabling the managed account
When true, all connections owned by this managed account will automatically be re-enabled. Note: Any connections that do not pass validations will not be re-enabled.
Example:
true
Response
Successful response with information about a single managed account.
Show child attributes
Show child attributes
Was this page helpful?
Disables a managed account
Previous
Update the amount of allocatable global outbound channels allocated to a specific managed account.
Next
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.managedAccounts.actions.enable('id');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.managed_accounts.actions.enable(
id="id",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.ManagedAccounts.Actions.Enable(
context.TODO(),
"id",
telnyx.ManagedAccountActionEnableParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.managedaccounts.actions.ActionEnableParams;
import com.telnyx.sdk.models.managedaccounts.actions.ActionEnableResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionEnableResponse response = client.managedAccounts().actions().enable("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.managed_accounts.actions.enable("id")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->managedAccounts->actions->enable(
'id', reenableAllConnections: true
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx managed-accounts:actions enable \
--api-key 'My API Key' \
--id idcurl --request POST \
--url https://api.telnyx.com/v2/managed_accounts/{id}/actions/enable \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reenable_all_connections": true
}
'{
"data": {
"record_type": "managed_account",
"id": "f65ceda4-6522-4ad6-aede-98de83385123",
"email": "user@example.com",
"api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
"api_user": "managed_account@example.com",
"api_token": "x6oexQNHTs-fZ7-QsDMOeg",
"manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"organization_name": "Example Company LLC",
"balance": {
"record_type": "balance",
"balance": "300.00",
"credit_limit": "100.00",
"available_credit": "400.00",
"currency": "USD"
},
"managed_account_allow_custom_pricing": true,
"rollup_billing": false
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}