> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

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



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/managed-accounts.yml get /managed_accounts
openapi: 3.1.0
info:
  title: Telnyx Managed Accounts API
  version: 2.0.0
  description: API for Managed accounts.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /managed_accounts:
    get:
      tags:
        - Managed Accounts
      summary: Lists accounts managed by the current user.
      description: >-
        Lists the accounts managed by the current user. Users need to be
        explictly approved by Telnyx in order to become manager accounts.
      operationId: ListManagedAccounts
      parameters:
        - $ref: '#/components/parameters/managed-accounts_FilterConsolidated'
        - $ref: '#/components/parameters/PageConsolidated'
        - $ref: '#/components/parameters/managed-accounts_Sort'
        - $ref: '#/components/parameters/IncludeCancelledAccounts'
      responses:
        '200':
          $ref: '#/components/responses/ListManagedAccountsResponse'
        '401':
          $ref: '#/components/responses/managed-accounts_UnauthorizedResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            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);
            }
        - lang: Python
          source: |-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.ManagedAccounts.List(context.TODO(), telnyx.ManagedAccountListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: >-
            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();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.managed_accounts.list

            puts(page)
        - lang: CLI
          source: |-
            telnyx managed-accounts list \
              --api-key 'My API Key'
components:
  parameters:
    managed-accounts_FilterConsolidated:
      name: filter
      in: query
      style: deepObject
      explode: true
      required: false
      description: >-
        Consolidated filter parameter (deepObject style). Originally:
        filter[email][contains], filter[email][eq],
        filter[organization_name][contains], filter[organization_name][eq]
      schema:
        type: object
        additionalProperties: false
        properties:
          email:
            type: object
            additionalProperties: false
            properties:
              contains:
                type: string
                description: >-
                  If present, email containing the given value will be returned.
                  Matching is not case-sensitive. Requires at least three
                  characters.
              eq:
                type: string
                description: >-
                  If present, only returns results with the <code>email</code>
                  matching exactly the value given.
          organization_name:
            type: object
            additionalProperties: false
            properties:
              contains:
                type: string
                description: >-
                  If present, only returns results with the
                  <code>organization_name</code> containing the given value.
                  Matching is not case-sensitive. Requires at least three
                  characters.
              eq:
                type: string
                description: >-
                  If present, only returns results with the
                  <code>organization_name</code> matching exactly the value
                  given.
        example:
          email:
            contains: john
          organization_name:
            eq: Example Company LLC
    PageConsolidated:
      name: page
      in: query
      style: deepObject
      explode: true
      description: >-
        Consolidated page parameter (deepObject style). Originally:
        page[number], page[size]
      schema:
        type: object
        properties:
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load
          size:
            type: integer
            minimum: 1
            maximum: 250
            default: 20
            description: The size of the page
    managed-accounts_Sort:
      name: sort
      in: query
      required: false
      description: >-
        Specifies the sort order for results. By default sorting direction is
        ascending. To have the results sorted in descending order add the <code>
        -</code> prefix.<br/><br/>

        That is: <ul>
          <li>
            <code>email</code>: sorts the result by the
            <code>email</code> field in ascending order.
          </li>

          <li>
            <code>-email</code>: sorts the result by the
            <code>email</code> field in descending order.
          </li>
        </ul> <br/> If not given, results are sorted by <code>created_at</code>
        in descending order.
      schema:
        type: string
        enum:
          - created_at
          - email
        example: email
        default: created_at
    IncludeCancelledAccounts:
      name: include_cancelled_accounts
      in: query
      required: false
      description: Specifies if cancelled accounts should be included in the results.
      schema:
        type: boolean
        example: true
        default: false
  responses:
    ListManagedAccountsResponse:
      description: Successful response with a list of managed accounts.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/ManagedAccountMultiListing'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
    managed-accounts_UnauthorizedResponse:
      description: >-
        Unauthenticated response. Happens when the current user cannot be
        authenticated.
  schemas:
    ManagedAccountMultiListing:
      type: object
      title: ManagedAccount
      required:
        - record_type
        - id
        - email
        - api_user
        - manager_account_id
        - created_at
        - updated_at
      properties:
        record_type:
          type: string
          example: managed_account
          enum:
            - managed_account
          description: Identifies the type of the resource.
        id:
          type: string
          format: uuid
          description: Uniquely identifies the managed account.
          example: f65ceda4-6522-4ad6-aede-98de83385123
        email:
          type: string
          format: email
          description: The managed account's email.
          example: user@example.com
        api_user:
          type: string
          description: >-
            The manager account's email, which serves as the V1 API user
            identifier
          example: managed_account@example.com
        organization_name:
          type: string
          description: The organization the managed account is associated with.
          example: Example Company LLC
        manager_account_id:
          type: string
          description: The ID of the manager account associated with the managed account.
          example: f65ceda4-6522-4ad6-aede-98de83385123
        created_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2018-02-02T22:25:27.521Z'
        managed_account_allow_custom_pricing:
          type: boolean
          description: >-
            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.
          example: true
        rollup_billing:
          type: boolean
          description: >-
            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.
          example: false
    PaginationMeta:
      type: object
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 55
        page_number:
          type: integer
          example: 2
        page_size:
          type: integer
          example: 25
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````