Lists accounts managed by the current user.
Lists the accounts managed by the current user. Users need to be explictly approved by Telnyx in order to become manager accounts.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const managedAccountListResponse of client.managedAccounts.list()) {
console.log(managedAccountListResponse.id);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.managed_accounts.list()
page = page.data[0]
print(page.id)
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"),
)
page, err := client.ManagedAccounts.List(context.TODO(), telnyx.ManagedAccountListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountListPage;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ManagedAccountListPage page = client.managedAccounts().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.managed_accounts.list
puts(page)<?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 {
$page = $client->managedAccounts->list(
filter: [
'email' => ['contains' => 'john', 'eq' => 'eq'],
'organizationName' => [
'contains' => 'contains', 'eq' => 'Example Company LLC'
],
],
includeCancelledAccounts: true,
pageNumber: 0,
pageSize: 0,
sort: 'email',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx managed-accounts list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/managed_accounts \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "managed_account",
"id": "f65ceda4-6522-4ad6-aede-98de83385123",
"email": "[email protected]",
"api_user": "[email protected]",
"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",
"managed_account_allow_custom_pricing": true,
"rollup_billing": false
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Consolidated filter parameter (deepObject style). Originally: filter[email][contains], filter[email][eq], filter[organization_name][contains], filter[organization_name][eq], filter[status][eq]
Show child attributes
Show child attributes
{
"email": { "contains": "john" },
"organization_name": { "eq": "Example Company LLC" }
}
Consolidated page parameter (deepObject style). Originally: page[number], page[size]
Show child attributes
Show child attributes
Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
That is:
-
email: sorts the result by theemailfield in ascending order. -
-email: sorts the result by theemailfield in descending order.
If not given, results are sorted by
created_at in descending order.created_at, email "email"
Specifies if cancelled accounts should be included in the results.
true
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const managedAccountListResponse of client.managedAccounts.list()) {
console.log(managedAccountListResponse.id);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.managed_accounts.list()
page = page.data[0]
print(page.id)
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"),
)
page, err := client.ManagedAccounts.List(context.TODO(), telnyx.ManagedAccountListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountListPage;
import com.telnyx.sdk.models.managedaccounts.ManagedAccountListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ManagedAccountListPage page = client.managedAccounts().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.managed_accounts.list
puts(page)<?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 {
$page = $client->managedAccounts->list(
filter: [
'email' => ['contains' => 'john', 'eq' => 'eq'],
'organizationName' => [
'contains' => 'contains', 'eq' => 'Example Company LLC'
],
],
includeCancelledAccounts: true,
pageNumber: 0,
pageSize: 0,
sort: 'email',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx managed-accounts list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/managed_accounts \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "managed_account",
"id": "f65ceda4-6522-4ad6-aede-98de83385123",
"email": "[email protected]",
"api_user": "[email protected]",
"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",
"managed_account_allow_custom_pricing": true,
"rollup_billing": false
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}