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

# List users

> Retrieve a paginated list of users for the current account (requires account-id header)



## OpenAPI

````yaml /api-reference/openapi/Evo-Auth-Service/users.yaml get /api/v1/users
openapi: 3.0.1
info:
  title: Evolution Foundation - Auth Service - Users
  description: Authentication and user and account management
  version: v1.0.0
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:3001
    description: Development server
    variables:
      port:
        default: '3001'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/users:
    get:
      summary: List users
      description: >-
        Retrieve a paginated list of users for the current account (requires
        account-id header)
      operationId: listUsers
      parameters:
        - name: account-id
          in: header
          description: Account ID (required)
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          description: Page number
          example: 1
          schema:
            type: integer
        - name: per_page
          in: query
          description: Items per page
          example: 25
          schema:
            type: integer
        - name: search
          in: query
          description: Search by name or email
          schema:
            type: string
        - name: role
          in: query
          description: |-
            Filter by role:
             * `administrator` 
             * `agent` 
             
          schema:
            type: string
            enum:
              - administrator
              - agent
        - name: status
          in: query
          description: Filter by status
          schema:
            type: string
            enum:
              - active
              - inactive
      responses:
        '200':
          description: Users retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserListResponse'
        '400':
          description: Bad Request (invalid data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation_error:
                  summary: Invalid query parameters
                  value:
                    success: false
                    error:
                      code: VALIDATION_ERROR
                      message: Invalid query parameters
                      details:
                        parameter: role
                        valid_values:
                          - administrator
                          - agent
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/users
                      method: GET
        '401':
          description: Unauthorized (invalid or missing token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_token:
                  summary: Invalid or missing token
                  value:
                    success: false
                    error:
                      code: INVALID_TOKEN
                      message: Invalid token
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/users
                      method: GET
        '403':
          description: Forbidden (insufficient permissions)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  summary: Insufficient permissions
                  value:
                    success: false
                    error:
                      code: FORBIDDEN
                      message: You are not authorized to perform this action
                      details:
                        action: users.read
                        record: User
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/users
                      method: GET
        '500':
          description: Internal Server Error (erro interno do servidor)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal server error
                  value:
                    success: false
                    error:
                      code: INTERNAL_ERROR
                      message: An unexpected error occurred
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/users
                      method: GET
      security:
        - ApiAccessTokenAuth: []
components:
  schemas:
    UserListResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/User'
        meta:
          type: object
          properties:
            page:
              type: integer
            per_page:
              type: integer
            total_pages:
              type: integer
            total_count:
              type: integer
        message:
          type: string
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Validation failed
            details:
              type: object
              additionalProperties: true
              nullable: true
        meta:
          type: object
          required:
            - timestamp
            - path
            - method
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2024-01-15T10:30:00Z'
            path:
              type: string
              example: /api/v1/super_admin/accounts/123
            method:
              type: string
              example: POST
    User:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        email:
          type: string
          format: email
        type:
          type: string
          enum:
            - User
            - SuperAdmin
        role:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            key:
              type: string
            name:
              type: string
        pubsub_token:
          type: string
        display_name:
          type: string
          nullable: true
        availability:
          type: string
          enum:
            - online
            - busy
            - offline
        mfa_enabled:
          type: boolean
        confirmed:
          type: boolean
        custom_attributes:
          type: object
          additionalProperties: true
        ui_settings:
          type: object
          additionalProperties: true
        is_super_admin:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiAccessTokenAuth:
      type: apiKey
      in: header
      name: api_access_token
      description: API access token authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.