import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.managedAccounts.actions.enable('id');
console.log(response.data);{
"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
}
}Enables a managed account and its sub-users to use Telnyx services.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.managedAccounts.actions.enable('id');
console.log(response.data);{
"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
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Managed Account User ID
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.
true
Successful response with information about a single managed account.
Show child attributes
Identifies the type of the resource.
managed_account "managed_account"
Uniquely identifies the managed account.
"f65ceda4-6522-4ad6-aede-98de83385123"
The managed account's email.
"user@example.com"
The managed account's V2 API access key
"KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA"
The manager account's email, which serves as the V1 API user identifier
"managed_account@example.com"
The managed account's V1 API token
"x6oexQNHTs-fZ7-QsDMOeg"
The ID of the manager account associated with the managed account.
"f65ceda4-6522-4ad6-aede-98de83385123"
ISO 8601 formatted date indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
The organization the managed account is associated with.
"Example Company LLC"
Show child attributes
Identifies the type of the resource.
balance "balance"
The account's current balance.
"300.00"
The account's credit limit.
"100.00"
Available amount to spend (balance + credit limit)
"400.00"
The ISO 4217 currency identifier.
"USD"
{
"record_type": "balance",
"balance": "300.00",
"credit_limit": "100.00",
"available_credit": "400.00",
"currency": "USD"
}Boolean value that indicates if the managed account is able to have custom pricing set for it or not. If false, uses the pricing of the manager account. Defaults to false. There may be time lag between when the value is changed and pricing changes take effect.
true
Boolean value that indicates if the billing information and charges to the managed account "roll up" to the manager account. If true, the managed account will not have its own balance and will use the shared balance with the manager account. This value cannot be changed after account creation without going through Telnyx support as changes require manual updates to the account ledger. Defaults to false.
false
Was this page helpful?