---
title: "Atualizar"
method: PUT
path: "/v1/department/{id}"
tags: ["Equipes"]
---

# Atualizar

`PUT /v1/department/{id}`

## Path parameters

- `id` string, uuid, required

## Request body

- PublicReqUpdateDepartmentDTO
  - `name` string, nullable — Nome da equipe
  - `isDefault` boolean — Se é a equipe padrão
  - `distributionIsEnabled` boolean — Se a distribuição está habilitada
  - `distributionConfig` DepartmentDetailsDistributionConfigDTO
    - `expirationIsEnabled` boolean
    - `maximumDurationInMinutes` integer
    - `inactivityTimeInMinutes` integer
  - `restrictionType` 'NONE' | 'DEPARTMENT_RESTRICTION' | 'USER_RESTRICTION', nullable — Tipo de restrição
  - `channelsConfig` PublicDepartmentChannelsDTO
    - `scope` 'ALL' | 'NONE' | 'SELECTED', nullable — Escopo de canais permitidos
    - `channels` string[], nullable — ID, nome ou numero dos canais permitidos (quando escopo é SELECTED)
  - `fields` string[], required — Campos que devem ser atualizados

## Response `200`

Success

- PublicDepartmentDTO
  - `id` string, uuid
  - `companyId` string, uuid
  - `createdAt` string, date-time
  - `directLinks` object, nullable
  - `updatedAt` string, date-time
  - `name` string, nullable
  - `isDefault` boolean
  - `distribuitionEnabled` boolean
  - `restrictionType` 'NONE' | 'DEPARTMENT_RESTRICTION' | 'USER_RESTRICTION'
  - `distributionConfig` DepartmentDetailsDistributionConfigDTO
    - `expirationIsEnabled` boolean
    - `maximumDurationInMinutes` integer
    - `inactivityTimeInMinutes` integer
  - `agents` PublicDepartmentAgentDTO[], nullable
    - `userId` string, uuid
    - `departmentId` string, uuid
    - `isAgent` boolean
    - `isSupervisor` boolean
  - `channels` DepartmentChannelDTO[], nullable
    - `id` string, uuid
    - `number` string, nullable
    - `name` string, nullable
    - `type` string, nullable
  - `description` string, nullable
  - `isPrivate` boolean

## Other responses

- `500` — Server Error

---

[API](https://skmtc.net/helena/apis/core.md) · [All operations](https://skmtc.net/helena/apis/core/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/helena/core/versions/811b2cdd2ec2/schema)
