## Update a service calendar; needs the current version (desk:admin)

`PUT /api/desk/v1/calendars/{id}`

Module: Desk · operationId: `updateCalendar` · Tag: Configuration · Auth: access token (`Authorization: Bearer <accessToken>`)

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

### Request body

`application/json` (required)

- `key` (string, required): Key of the calendar, unique in the tenant
- `name` (string, required): Name of the calendar
- `archived` (boolean): Archived: the calendar is kept for existing data but no longer offered in pickers
- `description` (string): Description of the calendar
- `exceptions` (array of object): Days that differ from the week (holidays, special hours)
  - `closed` (boolean): Closed all day
  - `date` (string (date)): Day
  - `hours` (array of HourSpan): Service hours of the day (when not closed)
    - `from` (string): Start time (HH:MM)
    - `to` (string): End time (HH:MM)
  - `note` (string): Note (e.g. the holiday)
- `holidayRegion` (string): Empty = the tenant's federal state (HR), none, or a federal state code
- `id` (string, read-only): Id of the calendar
- `isDefault` (boolean): Calendar of policies that name none
- `onCall` (object): On-call windows by weekday key
- `timeZone` (string): IANA zone, default Europe/Berlin
- `version` (integer): Version of the calendar; send it back on change (409 version_conflict when it is outdated)
- `weekly` (object): Opening hours by weekday key (mon … sun)

Example:

```json
{
  "archived": false,
  "description": "Montag bis Freitag, 8 bis 17 Uhr",
  "exceptions": [
    {
      "closed": true,
      "date": "2026-12-24",
      "hours": [],
      "note": "Heiligabend"
    },
    {
      "closed": false,
      "date": "2026-12-31",
      "hours": [
        {
          "from": "08:00",
          "to": "12:00"
        }
      ],
      "note": "Silvester nur vormittags"
    }
  ],
  "holidayRegion": "",
  "id": "2e9f0a1b-3c4d-4e5f-8a7b-9c0d1e2f3a01",
  "isDefault": true,
  "key": "geschaeftszeiten",
  "name": "Geschäftszeiten",
  "onCall": {},
  "timeZone": "Europe/Berlin",
  "version": 2,
  "weekly": {
    "fri": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "mon": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "thu": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "tue": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "wed": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ]
  }
}
```

### Responses

- **200** Saved (`application/json`)
- **409** Version conflict

Fields of the 200 answer:

- `key` (string, required): Key of the calendar, unique in the tenant
- `name` (string, required): Name of the calendar
- `archived` (boolean): Archived: the calendar is kept for existing data but no longer offered in pickers
- `description` (string): Description of the calendar
- `exceptions` (array of object): Days that differ from the week (holidays, special hours)
  - `closed` (boolean): Closed all day
  - `date` (string (date)): Day
  - `hours` (array of HourSpan): Service hours of the day (when not closed)
    - `from` (string): Start time (HH:MM)
    - `to` (string): End time (HH:MM)
  - `note` (string): Note (e.g. the holiday)
- `holidayRegion` (string): Empty = the tenant's federal state (HR), none, or a federal state code
- `id` (string, read-only): Id of the calendar
- `isDefault` (boolean): Calendar of policies that name none
- `onCall` (object): On-call windows by weekday key
- `timeZone` (string): IANA zone, default Europe/Berlin
- `version` (integer): Version of the calendar; send it back on change (409 version_conflict when it is outdated)
- `weekly` (object): Opening hours by weekday key (mon … sun)

Example 200 answer:

```json
{
  "archived": false,
  "description": "Montag bis Freitag, 8 bis 17 Uhr",
  "exceptions": [
    {
      "closed": true,
      "date": "2026-12-24",
      "hours": [],
      "note": "Heiligabend"
    },
    {
      "closed": false,
      "date": "2026-12-31",
      "hours": [
        {
          "from": "08:00",
          "to": "12:00"
        }
      ],
      "note": "Silvester nur vormittags"
    }
  ],
  "holidayRegion": "",
  "id": "2e9f0a1b-3c4d-4e5f-8a7b-9c0d1e2f3a01",
  "isDefault": true,
  "key": "geschaeftszeiten",
  "name": "Geschäftszeiten",
  "onCall": {},
  "timeZone": "Europe/Berlin",
  "version": 2,
  "weekly": {
    "fri": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "mon": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "thu": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "tue": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ],
    "wed": [
      {
        "from": "08:00",
        "to": "17:00"
      }
    ]
  }
}
```

### Example request

```bash
curl -X PUT 'https://api.mbcom.cloud/api/desk/v1/calendars/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"archived":false,"description":"Montag bis Freitag, 8 bis 17 Uhr","exceptions":[{"closed":true,"date":"2026-12-24","hours":[],"note":"Heiligabend"},{"closed":false,"date":"2026-12-31","hours":[{"from":"08:00","to":"12:00"}],"note":"Silvester nur vormittags"}],"holidayRegion":"","id":"2e9f0a1b-3c4d-4e5f-8a7b-9c0d1e2f3a01","isDefault":true,"key":"geschaeftszeiten","name":"Geschäftszeiten","onCall":{},"timeZone":"Europe/Berlin","version":2,"weekly":{"fri":[{"from":"08:00","to":"17:00"}],"mon":[{"from":"08:00","to":"17:00"}],"thu":[{"from":"08:00","to":"17:00"}],"tue":[{"from":"08:00","to":"17:00"}],"wed":[{"from":"08:00","to":"17:00"}]}}'
```
