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

# List department members

> list department members



## OpenAPI

````yaml /openapi/user.yaml get /api/v1/auth/users/department-members
openapi: 3.0.3
info:
  title: CapeMedia User Service API
  version: 1.0.0
  description: |2-

        **CapeMedia User Service API** - Comprehensive user service and management system.

        ## Authentication
        This API uses **JWT Bearer tokens** for authentication.

        1. Login via `/api/v1/auth/login` to obtain tokens
        2. Include the access token in the `Authorization` header: `Bearer <access_token>`
        3. Refresh expired tokens via `/api/v1/auth/refresh-token`

        ## Versioning
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
  contact:
    name: API Support
    email: support@capemedia.co.ke
  license:
    name: Cape Media
servers:
  - url: https://api.diginacape.co.ke/acl
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/auth/users/department-members:
    get:
      tags:
        - Users
      summary: List department members
      description: list department members
      operationId: users_department_members
      parameters:
        - in: query
          name: department
          schema:
            type: string
            format: uuid
        - in: query
          name: department_name
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: ordering
          required: false
          in: query
          description: Which field to use when ordering the results.
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: search
          required: false
          in: query
          description: A search term.
          schema:
            type: string
        - in: query
          name: section
          schema:
            type: string
            format: uuid
        - in: query
          name: section_name
          schema:
            type: string
        - in: query
          name: status
          schema:
            type: string
        - in: query
          name: user_type
          schema:
            type: string
            x-spec-enum-id: a7ab5e3cba9d3868
            enum:
              - CONSUMER
              - CORRESPONDENT
              - STAFF
          description: |-
            * `STAFF` - Staff
            * `CORRESPONDENT` - Correspondent
            * `CONSUMER` - Cape Digi Consumer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedListUsersList'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    PaginatedListUsersList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/ListUsers'
    ListUsers:
      type: object
      description: Serializer for listing users with department information.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        username:
          type: string
          pattern: ^[\w.@+-]+$
          maxLength: 150
        email:
          type: string
          format: email
          title: Email address
          maxLength: 254
        first_name:
          type: string
          maxLength: 150
        last_name:
          type: string
          maxLength: 150
        name:
          type: string
          readOnly: true
        phone_number:
          type: string
          maxLength: 50
        status:
          type: string
          maxLength: 20
        user_type:
          enum:
            - STAFF
            - CORRESPONDENT
            - CONSUMER
          type: string
          description: |-
            * `STAFF` - Staff
            * `CORRESPONDENT` - Correspondent
            * `CONSUMER` - Cape Digi Consumer
          x-spec-enum-id: a7ab5e3cba9d3868
        date_joined:
          type: string
          format: date-time
        last_login:
          type: string
          format: date-time
          nullable: true
        inactive_alert:
          type: boolean
          description: >-
            True if the user has not logged in for 2 or more business days
            (Mon–Fri).


            None last_login (never logged in) is also treated as inactive.
          readOnly: true
        department:
          type: string
          readOnly: true
        section:
          type: string
          readOnly: true
      required:
        - department
        - id
        - inactive_alert
        - name
        - section
        - username
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````