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

# List departments

> Read-only — no create/update via v1.



## OpenAPI

````yaml /openapi.yaml get /departments
openapi: 3.1.0
info:
  title: Humdov Developer API
  version: '1.0'
  description: >
    Read and write records in a Humdov organization. Every request is
    authenticated with an API key (`X-Api-Key` header) created from the Humdov
    dashboard's Developer API page. See the Guides tab for authentication,
    pagination, rate limits, and the error format.
servers:
  - url: https://api.humdov.app/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Members
  - name: Tags
  - name: Prayer Requests
  - name: Forms
  - name: Form Responses
  - name: Events
  - name: Services
  - name: Attendance
  - name: Departments
paths:
  /departments:
    get:
      tags:
        - Departments
      summary: List departments
      description: Read-only — no create/update via v1.
      operationId: list-departments
      parameters:
        - name: q
          in: query
          description: Searches the department's name.
          schema:
            type: string
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Pagination'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Department'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - ApiKeyAuth:
            - departments.view
components:
  parameters:
    Cursor:
      name: cursor
      in: query
      description: >-
        Opaque pagination cursor from a previous response's
        `pagination.next_cursor`.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      description: Page size. Default 25, max 100.
      schema:
        type: integer
        default: 25
        maximum: 100
  schemas:
    Pagination:
      type: object
      properties:
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
    Department:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          nullable: true
        head_of_department:
          type: string
          nullable: true
        member_ids:
          type: array
          items:
            type: string
        members_count:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: not_found
            message:
              type: string
              example: Member not found
  responses:
    Unauthorized:
      description: Missing, invalid, revoked, or expired API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key doesn't have the required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until the rate-limit window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >
        Create a key from the Humdov dashboard's Developer API page. See the
        Authentication guide for scopes and lifecycle.

````

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