---
title: "Updating a department"
method: PUT
path: "/departments/{departmentId}"
tags: ["Company Departments"]
---

# Updating a department

`PUT /departments/{departmentId}`

Updates a department.

## Path parameters

- `departmentId` integer, required

## Request body

- DepartmentRequest — Department to create
  - `name` string, required — Name of the department
  - `code` string — External code of the department
  - `similarTo` 'financial_management' | 'agronomy' | 'architecture' | 'audit_or_quality' | 'attendance' | 'sales' | 'purchases' | 'communication_or_design_or_marketing' | 'accounting_or_controlling' | 'engineering_or_maintenance_or_technical_services' | 'legal' | 'innovation_or_product' | 'logistics' | 'operations' | 'project_or_processes' | 'human_resources' | 'security' | 'technology', required — Department is similar to

## Response `200`

A confirmation of successful update of the department

- Department — Company department
  - `id` integer, required — Department ID
  - `name` string — Name of the department
  - `code` string — External code of the department
  - `similarTo` 'financial_management' | 'agronomy' | 'architecture' | 'audit_or_quality' | 'attendance' | 'sales' | 'purchases' | 'communication_or_design_or_marketing' | 'accounting_or_controlling' | 'engineering_or_maintenance_or_technical_services' | 'legal' | 'innovation_or_product' | 'logistics' | 'operations' | 'project_or_processes' | 'human_resources' | 'security' | 'technology' — Department is similar to
  - `createdAt` string, date-time, required — Department creation date
  - `updatedAt` string, date-time, required — Department update date

## Other responses

- `400` — BadRequest / Invalid Input
- `401` — Unauthorized
- `403` — Forbidden
- `404` — NotFound / Resource not found
- `409` — Conflict

---

[API](https://skmtc.net/gupy/apis/gupy-public-api.md) · [All operations](https://skmtc.net/gupy/apis/gupy-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gupy/gupy-public-api/revisions/3f26defa2a42/schema)
