# Delete a department

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

Operation ID: `departments.delete` · API v3

Deletes a support department.

A department that still has tickets assigned to it, including deleted tickets, cannot be deleted. The request is rejected with the `state_conflict` error code and the department and its tickets remain unchanged. The `tickets_count` field of the department reflects these tickets.

Required permissions: `departments.delete`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `department_id` | path | string | yes |  |

## Responses

### 204

The department was deleted successfully.

### 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.

### 409

The department still has tickets assigned to it.

Body: Error.

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