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

# Update department

> Operacion: Update department.



## OpenAPI

````yaml /generated/specs/platform.json patch /api/hr/departments/{id}
openapi: 3.0.0
info:
  title: Raul API - Plataforma
  description: Portal cliente, templates, RRHH, notificaciones y automatizaciones internas.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/hr/departments/{id}:
    patch:
      tags:
        - HR - Departments
      summary: Update department
      description: 'Operacion: Update department.'
      operationId: DepartmentsController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDepartmentDto'
      responses:
        '200':
          description: Department updated
        '400':
          description: Invalid data or would create cycle
        '404':
          description: Department not found
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateDepartmentDto:
      type: object
      properties:
        name:
          type: string
          description: Department name
        description:
          type: string
          description: Department description
        parent_id:
          type: string
          description: Parent department ID (UUID)
        is_active:
          type: boolean
          description: Active status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token de sesión Better Auth para rutas de backoffice; las rutas de
        portal usan su token propio.

````

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