# Update a department

`PATCH https://api.cademi.com.br/api/v3/support/departments/{department_id}`

Operation ID: `departments.update` · API v3

Renames a support department.

The `If-Match` header is optional. When supplied, it must contain the `ETag` returned by the retrieve operation; if the department has changed since then, the update is rejected.

Required permissions: `departments.update`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `department_id` | path | string | yes |  |
| `If-Match` | header | string | no |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | no |  |

## Responses

### 200

Returns the updated department.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The department was not found or is not accessible with the current credentials.

Body: Error.

### 412

The department has changed since the supplied revision was retrieved.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
