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

# List organization users

> Returns a list of the users in your organization.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/managed-accounts.yml get /organizations/users
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:
  /organizations/users:
    get:
      tags:
        - Organization Users
      summary: List organization users
      description: Returns a list of the users in your organization.
      operationId: ListOrganizationUsers
      parameters:
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/users_PageSize'
        - $ref: '#/components/parameters/FilterOrganizationUserStatus'
        - $ref: '#/components/parameters/FilterOrganizationUserEmail'
        - $ref: '#/components/parameters/IncludeGroups'
      responses:
        '200':
          $ref: '#/components/responses/ListOrganizationUsersResponse'
        '400':
          $ref: '#/components/responses/users_BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthenticatedResponse'
        '403':
          $ref: '#/components/responses/users_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 organizationUser of
            client.organizations.users.list()) {
              console.log(organizationUser.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.organizations.users.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.Organizations.Users.List(context.TODO(), telnyx.OrganizationUserListParams{})\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.organizations.users.UserListPage;
            import com.telnyx.sdk.models.organizations.users.UserListParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    UserListPage page = client.organizations().users().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.organizations.users.list

            puts(page)
        - lang: PHP
          source: >-
            <?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->organizations->users->list(
                filterEmail: 'filter[email]',
                filterUserStatus: 'enabled',
                includeGroups: true,
                pageNumber: 1,
                pageSize: 1,
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx organizations:users list \
              --api-key 'My API Key'
components:
  parameters:
    PageNumber:
      name: page[number]
      in: query
      description: The page number to load
      schema:
        type: integer
        minimum: 1
        default: 1
    users_PageSize:
      name: page[size]
      in: query
      description: The size of the page
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 250
    FilterOrganizationUserStatus:
      name: filter[user_status]
      in: query
      description: Filter by user status
      schema:
        type: string
        enum:
          - enabled
          - disabled
          - blocked
    FilterOrganizationUserEmail:
      name: filter[email]
      in: query
      description: Filter by email address (partial match)
      schema:
        type: string
    IncludeGroups:
      name: include_groups
      in: query
      description: >-
        When set to true, includes the groups array for each user in the
        response. The groups array contains objects with id and name for each
        group the user belongs to.
      schema:
        type: boolean
        default: false
  responses:
    ListOrganizationUsersResponse:
      description: Successful response with a list of organization users.
      content:
        application/json:
          schema:
            type: object
            title: List Organization Users Response
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationUser'
              meta:
                $ref: '#/components/schemas/users_PaginationMeta'
    users_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              value:
                errors:
                  - code: '10015'
                    title: Bad Request
                    detail: The request failed because it was not well-formed.
                    source:
                      pointer: /
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10015
    UnauthenticatedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            Authentication Failed:
              value:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not understand the provided credentials.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
    users_UnauthorizedResponse:
      description: >-
        The user doesn't have the required permissions to perform the requested
        action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notAuthorized:
              value:
                errors:
                  - code: '10010'
                    title: Not authorized
                    detail: You are not authorized to access the requested resource.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10010
                    source:
                      pointer: /
  schemas:
    OrganizationUser:
      type: object
      title: OrganizationUser
      properties:
        id:
          type: string
          description: Identifies the specific resource.
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: >-
            Identifies the type of the resource. Can be 'organization_owner' or
            'organization_sub_user'.
          example: organization_sub_user
        email:
          type: string
          format: email
          description: The email address of the user.
          example: user@example.com
        user_status:
          description: The status of the account.
          type: string
          enum:
            - enabled
            - disabled
            - blocked
          default: enabled
          example: enabled
        organization_user_bypasses_sso:
          type: boolean
          description: >-
            Indicates whether this user is allowed to bypass SSO and use
            password authentication.
          example: false
        created_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2018-02-02T22:25:27.521Z'
        last_sign_in_at:
          type:
            - string
            - 'null'
          description: >-
            ISO 8601 formatted date indicating when the resource last signed
            into the portal. Null if the user has never signed in.
          example: '2018-02-02T22:25:27.521Z'
        groups:
          type: array
          description: >-
            The groups the user belongs to. Only included when include_groups
            parameter is true.
          items:
            $ref: '#/components/schemas/UserGroupReference'
      example:
        id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type: organization_sub_user
        email: user@example.com
        user_status: enabled
        organization_user_bypasses_sso: false
        created_at: '2018-02-02T22:25:27.521Z'
        last_sign_in_at: '2018-02-02T22:25:27.521Z'
    users_PaginationMeta:
      title: Pagination Meta
      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
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              detail:
                type: string
              meta:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
              title:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
    UserGroupReference:
      type: object
      title: UserGroupReference
      description: A reference to a group that a user belongs to.
      properties:
        id:
          type: string
          description: The unique identifier of the group.
          example: 7b09cdc3-8948-47f0-aa62-74ac943d6c59
        name:
          type: string
          description: The name of the group.
          example: Engineering
      required:
        - id
        - name
      example:
        id: 7b09cdc3-8948-47f0-aa62-74ac943d6c59
        name: Engineering
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````