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

# Get Team Members

> Retrieves a paginated, searchable list of team members who have access to Automate Chats. Supports filtering by role and WhatsApp role, and sorting by various member attributes.

Retrieves all team members who have been granted access to Automate Chats. You can use their user IDs to assign chats via the Assign Chat API.


## OpenAPI

````yaml GET /api/workspace/automate-members
openapi: 3.1.0
info:
  title: Automate Chats API
  description: >-
    API for managing WhatsApp template messages, contacts, custom fields, tags,
    and external integrations.
  version: 1.0.0
servers:
  - url: https://api.automatechats.com
security:
  - apiKeyAuth: []
paths:
  /api/workspace/automate-members:
    get:
      summary: Get Team Members
      description: >-
        Retrieves a paginated, searchable list of team members who have access
        to Automate Chats. Supports filtering by role and WhatsApp role, and
        sorting by various member attributes.
      parameters:
        - name: search
          in: query
          description: Search term to filter members by name or email
          required: false
          schema:
            type: string
        - name: role
          in: query
          description: Filter members by their workspace role
          required: false
          schema:
            type: string
        - name: automate_whatsapp_role
          in: query
          description: Filter members by their Automate WhatsApp role
          required: false
          schema:
            type: string
        - name: page
          in: query
          description: 'Page number for pagination (min: 1)'
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          description: Number of members per page
          required: false
          schema:
            type: integer
            default: 10
        - name: sortBy
          in: query
          description: Field to sort results by
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
              - first_name
              - last_name
              - email
              - role
        - name: sortOrder
          in: query
          description: Sort direction
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
      responses:
        '200':
          description: List of team members
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                          example: 1
                        user_id:
                          type: string
                          example: 6996aeeedf12574080a99d81
                        email:
                          type: string
                          example: jane.doe@example.com
                        first_name:
                          type: string
                          example: Jane
                        last_name:
                          type: string
                          example: Doe
                        role_id:
                          type: string
                          example: agent
                        automate_whatsapp_role:
                          type: string
                          example: supervisor
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        example: 1
                      limit:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 30
                      totalPages:
                        type: integer
                        example: 3
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  responses:
    UnauthorizedError:
      description: Unauthorized (missing or invalid API key / JWT token)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: 401
            message: >-
              Unauthorized access: Invalid or missing authentication
              credentials.
            timestamp: '2026-05-18T15:00:00.000Z'
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        code:
          type: integer
          example: 400
        message:
          type: string
          example: 'Invalid input: field first_name is required.'
        error:
          description: Optional validation error details or raw stack traces.
        timestamp:
          type: string
          format: date-time
          example: '2026-05-18T15:00:00.000Z'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````