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

# Get Users

> Retrieve a list of `users`.



## OpenAPI

````yaml api-reference/openapi.json get /users
openapi: 3.1.0
info:
  title: Endpoints
  version: '1.0'
servers:
  - url: https://api.contextual.ai/v1
security:
  - BearerAuth: []
paths:
  /users:
    get:
      tags:
        - /users
      summary: Get Users
      description: Retrieve a list of `users`.
      operationId: get_users_users_get
      parameters:
        - name: search
          in: query
          required: false
          schema:
            type: string
            description: Query to filter users by email
            title: Search
          description: Query to filter users by email
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            description: Cursor for the beginning of the current page
            title: Cursor
          description: Cursor for the beginning of the current page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: Number of users to return
            default: 50
            title: Limit
          description: Number of users to return
        - name: deactivated
          in: query
          required: false
          schema:
            type: boolean
            description: When set to true, return deactivated users instead.
            default: false
            title: Deactivated
          description: When set to true, return deactivated users instead.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UsersListResponse:
      properties:
        users:
          items:
            $ref: '#/components/schemas/TenantUserInfo'
          type: array
          title: Users
          description: List of users
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for the beginning of the next page
      type: object
      required:
        - users
      title: UsersListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TenantUserInfo:
      properties:
        email:
          type: string
          title: Email
          description: The email of the user
        is_tenant_admin:
          type: boolean
          title: Is Tenant Admin
          description: Flag indicating if the user is a tenant admin
          default: false
        roles:
          items:
            $ref: '#/components/schemas/UserRolesEnum'
          type: array
          title: Roles
          description: The user level roles of the user.
        id:
          type: string
          title: Id
        effective_roles:
          items:
            $ref: '#/components/schemas/UserRolesEnum'
          type: array
          title: Effective Roles
          description: The effective roles of the user.
      type: object
      required:
        - email
        - id
      title: TenantUserInfo
      description: The schema used for listing existing (activated / deactivated) users.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserRolesEnum:
      type: string
      enum:
        - VISITOR
        - AGENT_USER
        - CUSTOMER_USER
        - CUSTOMER_INTERNAL_USER
        - CONTEXTUAL_STAFF_USER
        - CONTEXTUAL_EXTERNAL_STAFF_USER
        - CONTEXTUAL_INTERNAL_STAFF_USER
        - TENANT_ADMIN
        - CUSTOMER_ADMIN
        - CONTEXTUAL_ADMIN
        - SUPER_ADMIN
        - SERVICE_ACCOUNT
      title: UserRolesEnum
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````