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

> Lists all the users of an app

# List

For the complete error reference, see [Error Guide](/articles/error-guide).


## OpenAPI

````yaml get /users
openapi: 3.0.0
info:
  title: Chat APIs
  description: Manage messages, users, groups for a particular app using our Chat API.
  version: '3.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: API Keys
    description: The API keys are used to authorise the APIs
  - name: Roles
    description: The roles are used to give user access rights
  - name: Users
    description: The REST collection for users.
  - name: Auth Tokens
    description: The auth tokens are used to login end users using client SDKs.
  - name: Blocked Users
    description: The REST collections for blocked users.
  - name: Friends
    description: List,add and remove friends by passing UID in path variables
  - name: Groups
    description: The REST collections for groups.
  - name: Banned Users
    description: Ban and Unban user by passing other UID in path variables.
  - name: Group Members
    description: The REST collections for group members.
  - name: Messages
    description: The REST collections for messages.
  - name: Conversations
    description: The REST collections for conversations.
  - name: Restrict Features
    description: Allows Restricting Features
  - name: Metrics
    description: Allows accessing Data Metrics
  - name: Triggers
    description: Allows adding triggers to a webhook.
  - name: Webhooks
    description: Allows accessing Webhooks.
  - name: Notifications
    description: Allows configuring Notifications core.
paths:
  /users:
    get:
      tags:
        - Users
      summary: List
      description: Lists all the users of an app
      operationId: list-users
      parameters:
        - name: searchKey
          in: query
          description: >-
            The searchKey query parameter work for both name and uid:

            It performs a LIKE% query, searching for uid/name values starting
            with the specified characters.
          schema:
            type: string
        - name: searchIn
          in: query
          description: Searches for specified keyword in name,UID or both.
          schema:
            type: array
            items:
              type: string
              enum:
                - name
                - uid
              description: Search field.
        - name: status
          in: query
          description: >-
            User list can be fetched depending on the user status.
            (available,offline).
          schema:
            type: string
            enum:
              - available
              - offline
            description: User status filter.
        - name: count
          in: query
          description: Fetches users count.
          schema:
            type: boolean
        - name: perPage
          in: query
          description: >-
            Number of users to be fetched in a request. The default value is 100
            and the maximum value is 1000.
          schema:
            type: integer
            default: '100'
        - name: page
          in: query
          description: Page Number.
          schema:
            type: integer
            default: '1'
        - name: role
          in: query
          description: Retrieves user list based on role.
          schema:
            type: string
        - name: withTags
          in: query
          description: Includes tags in the response.
          schema:
            type: boolean
        - name: tags
          in: query
          description: Fetches only those users that have these tags.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: roles
          in: query
          description: Fetches users based on multiple roles.
          schema:
            type: array
            items:
              type: string
        - name: onlyDeactivated
          in: query
          description: Fetches all the deactivated users of an app.
          schema:
            type: boolean
        - name: withDeactivated
          in: query
          description: Fetches all the users including deactivated users.
          schema:
            type: boolean
      responses:
        '200':
          description: A list of users
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        uid:
                          type: string
                        name:
                          type: string
                        link:
                          type: string
                        avatar:
                          type: string
                        metadata:
                          type: object
                        status:
                          type: string
                        role:
                          type: string
                        createdAt:
                          type: integer
                        updatedAt:
                          type: integer
                        conversationId:
                          type: string
                  meta:
                    type: object
                type: object
              example:
                data:
                  - uid: cometchat-uid-6
                    name: Barry Allen
                    link: https://cometchat.com
                    avatar: >-
                      https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp
                    metadata:
                      email: user@email.com
                      contactNumber: '0123456789'
                    status: offline
                    role: manager
                    createdAt: 1638354015
                    updatedAt: 1638354799
                    conversationId: cometchat-uid-4_user_cometchat-uid-6
                  - uid: cometchat-uid-2
                    name: George Alan
                    avatar: >-
                      https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp
                    status: offline
                    role: default
                    createdAt: 1629869270
                    updatedAt: 1630308676
                    conversationId: cometchat-uid-2_user_cometchat-uid-4
                  - uid: cometchat-uid-3
                    name: George Alan
                    link: https://data-us.cometchat.io/assets
                    avatar: >-
                      https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp
                    metadata:
                      contactNumber: '0123456789'
                    status: offline
                    role: default
                    blockedByMe: true
                    blockedByMeAt: 1638346853
                    blockedAt: 1638346853
                    createdAt: 1629869270
                    updatedAt: 1638351060
                    conversationId: cometchat-uid-3_user_cometchat-uid-4
                meta:
                  pagination:
                    total: 0
                    count: 5
                    per_page: 100
                    current_page: 1
                    total_pages: 1
                cursor:
                  updatedAt: 1638354799
                  affix: prepend
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````