---
title: "Update a member's holiday settings"
description: "Upserts the member's holiday settings."
api_method: PUT
api_path: "/v1/holidays/settings"
canonical_url: https://wiblo.app/docs/developers/api/holidays/update-holiday-settings
last_updated: 2026-07-28T18:08:25+02:00
md_url: https://wiblo.app/docs/developers/api/holidays/update-holiday-settings.md
---

# Update a member's holiday settings

`PUT /v1/holidays/settings`

Upserts the member's holiday settings. `country_code` sets or clears (null) the holiday country; naming a country resets `disabled_event_ids` unless `reset_disabled=false` (the old-wiblo default). `disabled_event_ids` replaces the member's opted-out holidays — every id must exist in the cached current + next year set for the country (the old toggle validation). Members manage their own settings, owner/admin manage anyone's. Responds with the same shape as GET. Per-user rate-limited at 60/60s.

## Headers

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Wiblo-Workspace` | `string` | Yes | Workspace id the call is scoped to. The actor must hold an active membership in it; a foreign or unknown id collapses onto 404 WORKSPACE_NOT_FOUND. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `member_id` | `string` | No | Member whose settings to update; defaults to the caller's own member row. Plain members may only name themselves; owner/admin may name anyone. |
| `country_code` | `string \| null` | No | Sets the holiday country (ISO 3166-1 alpha-2, case-insensitive, stored uppercase); `null` clears it, omission keeps the current value. |
| `disabled_event_ids` | `array<string>` | No | Replaces the member's opted-out holiday set (at most 500 ids); every id must exist in the cached current + next year set for the country. |
| `reset_disabled` | `boolean` | No | Whether naming a `country_code` resets `disabled_event_ids`; defaults to resetting — pass `false` to keep the existing disabled set. |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/holidays/settings \
  -X PUT \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "X-Wiblo-Workspace: $WIBLO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "member_id": "5f2d8c1b-7e4a-4b9d-a6c3-1d8e5f2a7b4c",
  "disabled_event_ids": [
    "20260831_60o30dr56ko30c1g60o30dr56g"
  ]
}'
```

**TypeScript**

```ts
import { createSdk, updateHolidaySettings } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await updateHolidaySettings({
  client: sdk,
  headers: { "X-Wiblo-Workspace": "..." },
  body: {
    "member_id": "5f2d8c1b-7e4a-4b9d-a6c3-1d8e5f2a7b4c",
    "disabled_event_ids": [
      "20260831_60o30dr56ko30c1g60o30dr56g"
    ]
  },
})
```

## Example response

```json
{
  "settings": {
    "member_id": "5f2d8c1b-7e4a-4b9d-a6c3-1d8e5f2a7b4c",
    "country_code": "GB",
    "disabled_event_ids": [
      "20260831_60o30dr56ko30c1g60o30dr56g"
    ]
  },
  "holidays": [
    {
      "event_id": "20260831_60o30dr56ko30c1g60o30dr56g",
      "name": "Summer Bank Holiday",
      "date": "2026-08-31",
      "year": 2026,
      "enabled": false
    },
    {
      "event_id": "20261225_8kr34cpj6cq34bb469i38e9k74",
      "name": "Christmas Day",
      "date": "2026-12-25",
      "year": 2026,
      "enabled": true
    },
    {
      "event_id": "20270101_c4o34e1g60o30c1g60o30dr56g",
      "name": "New Year's Day",
      "date": "2027-01-01",
      "year": 2027,
      "enabled": true
    },
    {
      "event_id": "20270326_8h0k8gr36gpj4bb26op38d9l6o",
      "name": "Good Friday",
      "date": "2027-03-26",
      "year": 2027,
      "enabled": true
    }
  ]
}
```

## Responses

**`200`** — The updated settings plus holiday statuses. Returns `HolidaySettingsResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `settings` | `object` | Yes | The member's stored settings, or the synthesized default (`null` country, empty disabled set) when no row exists. |
| `settings.member_id` | `string` | Yes | Workspace member these settings belong to. |
| `settings.country_code` | `string \| null` | Yes | The member's holiday country (ISO 3166-1 alpha-2, uppercase); `null` means holiday blocking is off. |
| `settings.disabled_event_ids` | `array<string>` | Yes | Holiday event ids the member has opted out of; disabled holidays never block availability. |
| `holidays` | `array<HolidayWithStatus>` | Yes | Cached holidays for the current and next year with their enabled status — future dates only unless the GET's `include_past=true`; empty when no country is set. |

**`400`** — Body failed Zod validation — malformed country code, or neither `country_code` nor `disabled_event_ids` provided (`VALIDATION_FAILED`). Returns `ApiErrorEnvelope`.

**`401`** — No valid session cookie or `wbl_*` bearer was present. Returns `ApiErrorEnvelope`.

**`403`** — A plain member named another member's settings (`SELF_EDIT_ONLY`). Returns `ApiErrorEnvelope`.

**`404`** — The workspace collapsed (`WORKSPACE_NOT_FOUND`) or `member_id` is unknown/cross-workspace (`MEMBER_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`422`** — No public-holiday calendar for that code (`COUNTRY_NOT_SUPPORTED`), disabling holidays without a country (`HOLIDAY_COUNTRY_NOT_SET`), an id outside the cached holiday set (`INVALID_HOLIDAY_EVENT`), or a machine member (`MEMBER_MUST_BE_HUMAN`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.

### The HolidayWithStatus object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `event_id` | `string` | Yes | Stable id of the holiday event in the source Google calendar; the key used in `disabled_event_ids`. |
| `name` | `string` | Yes | Display name of the holiday. |
| `date` | `string` | Yes | Date of the holiday (`YYYY-MM-DD`). |
| `year` | `integer` | Yes | Calendar year of `date`. |
| `enabled` | `boolean` | Yes | Whether the holiday blocks this member's availability; `false` when its `event_id` is in `disabled_event_ids`. |
