### Copenhagen Truck Wash API Help

# Update department goal

This endpoint documentation is generated directly from `openapi.yaml`.

## Endpoint

PUT /goals/department

## Operation

Operation ID: `updateDepartmentGoal`

Update an existing department goal by `id`. Access control: - The creator (`created_by`) may update regardless of department membership. - Otherwise the user must satisfy the same subset rule as for read access, and any new `departments` provided must also be a subset unless the user has `superuser`.

## Authentication

Security requirements:

Scheme | Scopes
--- | ---
BearerAuth | -

## Request Body

Required: yes.

Content type: `application/json`

{ "$ref": "#/components/schemas/DepartmentGoalUpdate" }

## Responses

Status | Description | Content Types
--- | --- | ---
200 | Department goal updated successfully | application/json
400 |  |
401 |  |
403 |  |
404 |  |

Schema for response `200` (`application/json`):

{ "$ref": "#/components/schemas/DepartmentGoal" }
17 March 2026