Open SidemenuAPI Reference
API Reference
Close Sidemenu

Managed Accounts

Lists accounts managed by the current user.listManagedAccounts

get https://api.telnyx.com/v2/managed_accounts

Lists the accounts managed by the current user. Users need to be explictly approved by Telnyx in order to become manager accounts.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/managed_accounts?page[number]=1&page[size]=20"
Parameters
In query
page[number]
integer (1)
optional

The page number to load.

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page.

Default: 20
filter[email][contains]
string
optional

If present, email containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.

Default: "null"
filter[email][eq]
string
optional

If present, only returns results with the email matching exactly the value given.

Default: "null"
sort
string
optional

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 the email field in ascending order.
  • -email: sorts the result by the email field in descending order.

If not given, results are sorted by created_at in descending order.

Default: "created_at"
Example: "email"
Options: [ "created_at", "email" ]
Responses
200

Successful response with a list of managed accounts.

401

Unauthorized response. Happens when the current user is not a manager account.

Success Response
{
  "data": [
    {
      "api_key": "KEY0174227C1D16D1B180A8FF742AD37F70_1bA4vlJKHpZcJGaSXaadFu",
      "api_token": "x6oexQNHTs-fZ7-QsDMOeg",
      "api_user": "managed_account@example.com",
      "balance": {
        "available_credit": "400.00",
        "balance": "300.00",
        "credit_limit": "100.00",
        "currency": "USD",
        "record_type": "balance"
      },
      "created_at": "2018-02-02T22:25:27.521Z",
      "email": "user@example.com",
      "id": "f65ceda4-6522-4ad6-aede-98de83385123",
      "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
      "organization_name": "Example Company LLC",
      "record_type": "managed_account",
      "updated_at": "2018-02-02T22:25:27.521Z"
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Create a new managed account.createManagedAccount

post https://api.telnyx.com/v2/managed_accounts

Create a new managed account owned by the authenticated user. You need to be explictly approved by Telnyx in order to become a manager account.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"business_name":"Larry's Cat Food Inc","email":"larry_cat_food@customer.org"}' \
  https://api.telnyx.com/v2/managed_accounts
Parameters
In body (application/json)
business_name
string
required

The name of the business for which the new managed account is being created, that will be used as the managed accounts's organization's name.

Example: "Larry's Cat Food Inc"
email
string
optional

The email address for the managed account. If not provided, the email address will be generated based on the email address of the manager account.

Example: "new_managed_account@customer.org"
password
string
optional

Password for the managed account. If a password is not supplied, the account will not be able to be signed into directly. (A password reset may still be performed later to enable sign-in via password.)

Example: "3jVjLq!tMuWKyWx4NN*CvhnB"
Responses
200

Successful response with information about a single managed account.

401

Unauthorized response. Happens when the current user is not a manager account.

422

Unprocessable entity. Check the 'detail' field in response for details.

Success Response
{
  "data": {
    "api_key": "KEY0174227C1D16D1B180A8FF742AD37F70_1bA4vlJKHpZcJGaSXaadFu",
    "api_token": "x6oexQNHTs-fZ7-QsDMOeg",
    "api_user": "managed_account@example.com",
    "balance": {
      "available_credit": "400.00",
      "balance": "300.00",
      "credit_limit": "100.00",
      "currency": "USD",
      "record_type": "balance"
    },
    "created_at": "2018-02-02T22:25:27.521Z",
    "email": "user@example.com",
    "id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "organization_name": "Example Company LLC",
    "record_type": "managed_account",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Retrieve a managed accountretrieveManagedAccount

get https://api.telnyx.com/v2/managed_accounts/{id}

Retrieves the details of a single managed account.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/managed_accounts/{id}"
Parameters
In path
id
string
required

Managed Account User ID

Responses
200

Successful response with information about a single managed account.

401

Unauthorized response. Happens when the current user is not a manager account.

404

Resource not found

Success Response
{
  "data": {
    "api_key": "KEY0174227C1D16D1B180A8FF742AD37F70_1bA4vlJKHpZcJGaSXaadFu",
    "api_token": "x6oexQNHTs-fZ7-QsDMOeg",
    "api_user": "managed_account@example.com",
    "balance": {
      "available_credit": "400.00",
      "balance": "300.00",
      "credit_limit": "100.00",
      "currency": "USD",
      "record_type": "balance"
    },
    "created_at": "2018-02-02T22:25:27.521Z",
    "email": "user@example.com",
    "id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "organization_name": "Example Company LLC",
    "record_type": "managed_account",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Enables a managed accountenableManagedAccount

post https://api.telnyx.com/v2/managed_accounts/{id}/actions/enable

Enables a managed account and its sub-users to use Telnyx services.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{}' \
  https://api.telnyx.com/v2/managed_accounts/{id}/actions/enable
Parameters
In path
id
string
required

Managed Account User ID

Responses
200

Successful response with information about a single managed account.

401

Unauthorized response. Happens when the current user is not a manager account.

404

Resource not found

422

Unprocessable entity. Check the 'detail' field in response for details.

Success Response
{
  "data": {
    "api_key": "KEY0174227C1D16D1B180A8FF742AD37F70_1bA4vlJKHpZcJGaSXaadFu",
    "api_token": "x6oexQNHTs-fZ7-QsDMOeg",
    "api_user": "managed_account@example.com",
    "balance": {
      "available_credit": "400.00",
      "balance": "300.00",
      "credit_limit": "100.00",
      "currency": "USD",
      "record_type": "balance"
    },
    "created_at": "2018-02-02T22:25:27.521Z",
    "email": "user@example.com",
    "id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "organization_name": "Example Company LLC",
    "record_type": "managed_account",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Disables a managed accountdisableManagedAccount

post https://api.telnyx.com/v2/managed_accounts/{id}/actions/disable

Disables a managed account, forbidding it to use Telnyx services, including sending or receiving phone calls and SMS messages. Ongoing phone calls will not be affected. The managed account and its sub-users will still be able to log in via the mission control portal.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{}' \
  https://api.telnyx.com/v2/managed_accounts/{id}/actions/disable
Parameters
In path
id
string
required

Managed Account User ID

Responses
200

Successful response with information about a single managed account.

401

Unauthorized response. Happens when the current user is not a manager account.

404

Resource not found

422

Unprocessable entity. Check the 'detail' field in response for details.

Success Response
{
  "data": {
    "api_key": "KEY0174227C1D16D1B180A8FF742AD37F70_1bA4vlJKHpZcJGaSXaadFu",
    "api_token": "x6oexQNHTs-fZ7-QsDMOeg",
    "api_user": "managed_account@example.com",
    "balance": {
      "available_credit": "400.00",
      "balance": "300.00",
      "credit_limit": "100.00",
      "currency": "USD",
      "record_type": "balance"
    },
    "created_at": "2018-02-02T22:25:27.521Z",
    "email": "user@example.com",
    "id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    "organization_name": "Example Company LLC",
    "record_type": "managed_account",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}
Previous: Billing

Was this section helpful?