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

# List all users in the company.

> # Access Control Rules

- Company user must be a part of the company.
- Admins can list users for all companies. Requires `read_all_companies` permissions.



## OpenAPI

````yaml GET /api/v0/companies/{company_id}/users
openapi: 3.1.0
info:
  title: Cantina Client API
  description: >-
    Endpoints available to client organizations. For an overview and
    authentication, see
    https://docs.cantina.xyz/for-organizations/getting-started/api-access.
  license:
    name: Cantina
    identifier: Cantina
  version: 0.1.0
servers: []
security: []
paths:
  /api/v0/companies/{company_id}/users:
    get:
      tags:
        - companies
      summary: List all users in the company.
      description: >-
        # Access Control Rules


        - Company user must be a part of the company.

        - Admins can list users for all companies. Requires `read_all_companies`
        permissions.
      operationId: company_users
      parameters:
        - name: include_all
          in: query
          description: |-
            If true include deleted and disabled users as well as users who are
            invited to the company, but haven't joined yet.

            Defaults to false, i.e. disabled users and users deleted from the
            repository are not included.
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: q
          in: query
          description: Search by name and username.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List of users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyUsers'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '401':
          description: Access not authorised
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
components:
  schemas:
    CompanyUsers:
      type: object
      description: List of users within a company.
      required:
        - users
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/CompanyUser'
    CantinaError:
      type: object
      description: Error returned by the Cantina API.
      required:
        - type
        - msg
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        msg:
          type: string
          description: Error message for the user.
    CompanyUser:
      type: object
      description: User within a company.
      required:
        - userId
        - name
        - username
        - email
        - isActivated
        - createdAt
        - isBot
        - role
        - companyId
      properties:
        userId:
          type: string
          format: uuid
        name:
          type: string
        username:
          type: string
        email:
          type: string
        avatar:
          type:
            - string
            - 'null'
        isGeneratedAvatar:
          type:
            - boolean
            - 'null'
        isActivated:
          type: boolean
        discord:
          type:
            - string
            - 'null'
        telegram:
          type:
            - string
            - 'null'
        timezone:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        isBot:
          type: boolean
        role:
          $ref: '#/components/schemas/CompanyRole'
        companyId:
          type: string
          format: uuid
        disabledAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Set when a company user has been disabled.
    ErrorType:
      type: string
      description: Type of error.
      enum:
        - email_not_verified
        - auth_invalid
        - auth_expired
        - auth_token_missing
        - auth_id_missing
        - invalid_password
        - disabled_user
        - tc_not_accepted
        - evicted
        - unauthorized
        - bad_request
        - not_found
        - forbidden
        - gone
        - payload_too_large
        - service_unavailable
        - internal_error
    CompanyRole:
      type: string
      enum:
        - manager
        - member
        - unverified_member

````