Managed Accounts API

Managed Accounts operations API

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.

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

filter[email][contains]
string
Default: "null"

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

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

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

sort
string
Default: "created_at"

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.
Enum: "created_at" "email"
Example: sort=email
include_cancelled_accounts
boolean
Default: "false"

Specifies if cancelled accounts should be included in the results.

Example: include_cancelled_accounts=true
Responses
200

Successful response with a list of managed accounts.

Response Schema: application/json
Array of objects (ManagedAccount)
object (PaginationMeta)
401

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

get/managed_accounts
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
      • "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",
      • "managed_account_allow_custom_pricing": true,
      • "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
      • "organization_name": "Example Company LLC",
      • "record_type": "managed_account",
      • "rollup_billing": false,
      • "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.

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.

SecuritybearerAuth
Request
Request Body schema: application/json
required

Parameters that define the managed account to be created

business_name
required
string

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.

email
string

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.

managed_account_allow_custom_pricing
boolean

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. This value may be changed after creation, but there may be time lag between when the value is changed and pricing changes take effect.

password
string

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.)

rollup_billing
boolean

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.

Responses
200

Successful response with information about a single managed account.

Response Schema: application/json
object (ManagedAccount)
api_key
required
string

The managed account's V2 API access key

api_token
required
string

The managed account's V1 API token

api_user
required
string

The manager account's email, which serves as the V1 API user identifier

object (ManagedAccountBalance)
created_at
required
string

ISO 8601 formatted date indicating when the resource was created.

email
required
string <email>

The managed account's email.

id
required
string <UUID>

Uniquely identifies the managed account.

managed_account_allow_custom_pricing
boolean

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.

manager_account_id
required
string

The ID of the manager account associated with the managed account.

organization_name
string

The organization the managed account is associated with.

record_type
required
string

Identifies the type of the resource.

Value: "managed_account"
rollup_billing
boolean

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.

updated_at
required
string

ISO 8601 formatted date indicating when the resource was updated.

401

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

422

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

Response Schema: application/json
Array of objects (UnprocessableEntityError)
Array
code
string <int>
detail
string
object
object
title
string
post/managed_accounts
Request samples
application/json
{
  • "business_name": "Larry's Cat Food Inc",
  • "email": "larry_cat_food@customer.org",
  • "managed_account_allow_custom_pricing": false,
  • "password": "3jVjLq!tMuWKyWx4NN*CvhnB",
  • "rollup_billing": false
}
Response samples
application/json
{
  • "data": {
    • "api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
    • "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",
    • "managed_account_allow_custom_pricing": true,
    • "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    • "organization_name": "Example Company LLC",
    • "record_type": "managed_account",
    • "rollup_billing": false,
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Retrieve a managed account

Retrieves the details of a single managed account.

SecuritybearerAuth
Request
path Parameters
id
required
string

Managed Account User ID

Responses
200

Successful response with information about a single managed account.

Response Schema: application/json
object (ManagedAccount)
api_key
required
string

The managed account's V2 API access key

api_token
required
string

The managed account's V1 API token

api_user
required
string

The manager account's email, which serves as the V1 API user identifier

object (ManagedAccountBalance)
created_at
required
string

ISO 8601 formatted date indicating when the resource was created.

email
required
string <email>

The managed account's email.

id
required
string <UUID>

Uniquely identifies the managed account.

managed_account_allow_custom_pricing
boolean

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.

manager_account_id
required
string

The ID of the manager account associated with the managed account.

organization_name
string

The organization the managed account is associated with.

record_type
required
string

Identifies the type of the resource.

Value: "managed_account"
rollup_billing
boolean

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.

updated_at
required
string

ISO 8601 formatted date indicating when the resource was updated.

401

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

404

Resource not found

get/managed_accounts/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
    • "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",
    • "managed_account_allow_custom_pricing": true,
    • "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    • "organization_name": "Example Company LLC",
    • "record_type": "managed_account",
    • "rollup_billing": false,
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Update a managed account

Update a single managed account.

SecuritybearerAuth
Request
path Parameters
id
required
string

Managed Account User ID

Request Body schema: application/json
required

Parameters that define the updates to the managed account

managed_account_allow_custom_pricing
boolean

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. This value may be changed, but there may be time lag between when the value is changed and pricing changes take effect.

Responses
200

Successful response with information about a single managed account.

Response Schema: application/json
object (ManagedAccount)
api_key
required
string

The managed account's V2 API access key

api_token
required
string

The managed account's V1 API token

api_user
required
string

The manager account's email, which serves as the V1 API user identifier

object (ManagedAccountBalance)
created_at
required
string

ISO 8601 formatted date indicating when the resource was created.

email
required
string <email>

The managed account's email.

id
required
string <UUID>

Uniquely identifies the managed account.

managed_account_allow_custom_pricing
boolean

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.

manager_account_id
required
string

The ID of the manager account associated with the managed account.

organization_name
string

The organization the managed account is associated with.

record_type
required
string

Identifies the type of the resource.

Value: "managed_account"
rollup_billing
boolean

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.

updated_at
required
string

ISO 8601 formatted date indicating when the resource was updated.

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.

Response Schema: application/json
Array of objects (UnprocessableEntityError)
Array
code
string <int>
detail
string
object
object
title
string
patch/managed_accounts/{id}
Request samples
application/json
{
  • "managed_account_allow_custom_pricing": true
}
Response samples
application/json
{
  • "data": {
    • "api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
    • "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",
    • "managed_account_allow_custom_pricing": true,
    • "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    • "organization_name": "Example Company LLC",
    • "record_type": "managed_account",
    • "rollup_billing": false,
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Disables a managed account

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 no longer be able to log in via the mission control portal.

SecuritybearerAuth
Request
path Parameters
id
required
string

Managed Account User ID

Responses
200

Successful response with information about a single managed account.

Response Schema: application/json
object (ManagedAccount)
api_key
required
string

The managed account's V2 API access key

api_token
required
string

The managed account's V1 API token

api_user
required
string

The manager account's email, which serves as the V1 API user identifier

object (ManagedAccountBalance)
created_at
required
string

ISO 8601 formatted date indicating when the resource was created.

email
required
string <email>

The managed account's email.

id
required
string <UUID>

Uniquely identifies the managed account.

managed_account_allow_custom_pricing
boolean

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.

manager_account_id
required
string

The ID of the manager account associated with the managed account.

organization_name
string

The organization the managed account is associated with.

record_type
required
string

Identifies the type of the resource.

Value: "managed_account"
rollup_billing
boolean

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.

updated_at
required
string

ISO 8601 formatted date indicating when the resource was updated.

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.

Response Schema: application/json
Array of objects (UnprocessableEntityError)
Array
code
string <int>
detail
string
object
object
title
string
post/managed_accounts/{id}/actions/disable
Request samples
Response samples
application/json
{
  • "data": {
    • "api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
    • "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",
    • "managed_account_allow_custom_pricing": true,
    • "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    • "organization_name": "Example Company LLC",
    • "record_type": "managed_account",
    • "rollup_billing": false,
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Enables a managed account

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

SecuritybearerAuth
Request
path Parameters
id
required
string

Managed Account User ID

Responses
200

Successful response with information about a single managed account.

Response Schema: application/json
object (ManagedAccount)
api_key
required
string

The managed account's V2 API access key

api_token
required
string

The managed account's V1 API token

api_user
required
string

The manager account's email, which serves as the V1 API user identifier

object (ManagedAccountBalance)
created_at
required
string

ISO 8601 formatted date indicating when the resource was created.

email
required
string <email>

The managed account's email.

id
required
string <UUID>

Uniquely identifies the managed account.

managed_account_allow_custom_pricing
boolean

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.

manager_account_id
required
string

The ID of the manager account associated with the managed account.

organization_name
string

The organization the managed account is associated with.

record_type
required
string

Identifies the type of the resource.

Value: "managed_account"
rollup_billing
boolean

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.

updated_at
required
string

ISO 8601 formatted date indicating when the resource was updated.

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.

Response Schema: application/json
Array of objects (UnprocessableEntityError)
Array
code
string <int>
detail
string
object
object
title
string
post/managed_accounts/{id}/actions/enable
Request samples
Response samples
application/json
{
  • "data": {
    • "api_key": "KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA",
    • "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",
    • "managed_account_allow_custom_pricing": true,
    • "manager_account_id": "f65ceda4-6522-4ad6-aede-98de83385123",
    • "organization_name": "Example Company LLC",
    • "record_type": "managed_account",
    • "rollup_billing": false,
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}