# Update holiday mode

Turn a team member's holiday mode on until a time, or move the end of their current holiday.

[endpoint]
method = "PATCH"
base_url = "https://incidents.betterstack.com"
path = "/api/v3/holiday-mode"

[[body_param]]
name = "user_id"
type = "string"
description = "The team member whose holiday mode this is, as `u123` or their e-mail address. Required with an organization API token. With OAuth, leave it out to use your own holiday mode. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). Letter case doesn't matter in an e-mail address."

[[body_param]]
name = "holiday_ends_at"
required = true
type = "datetime"
description = "When the holiday ends. Accepts an ISO 8601 time in the future."

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content-Type"
description = "application/json"
required = false
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "Returns the updated holiday mode."
body = '''
{
  "data": {
    "id": "u123",
    "type": "holiday_mode",
    "attributes": {
      "on_holiday": true,
      "holiday_ends_at": "2026-12-24T09:00:00Z"
    }
  }
}
'''

[[response]]
status = 401
description = "The API token is missing or invalid."
body = '''
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
'''

[[response]]
status = 403
description = "The token is read-only, your role doesn't allow the action, or the token can't be used for this API. A team API token can't be used, and an OAuth token can't name someone else in `user_id`."
body = '''
{
  "errors": "This API token is read-only and cannot be used for write operations."
}
'''

[[response]]
status = 422
description = "The `holiday_ends_at` value is missing, isn't an ISO 8601 time or has already passed, an attribute is unknown, or an organization API token's `user_id` is missing or names no team member of the organization."
body = '''
{
  "errors": "`holiday_ends_at` must be in the future."
}
'''
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the holiday mode, such as `u123`."

[[param]]
name = "type"
type = "string"
description = "Always `holiday_mode`."

[[param]]
name = "on_holiday"
type = "boolean"
description = "Whether the team member is on holiday now."

[[param]]
name = "holiday_ends_at"
type = "datetime or null"
description = "When the holiday ends, rounded up to the whole second. `null` when holiday mode is off. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."
[/params]

#### Example cURL

[code-tabs]
```shell
[label Turn on holiday mode]
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v3/holiday-mode \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "holiday_ends_at": "2026-12-24T09:00:00Z"
}'
```
```shell
[label Turn on a team member's holiday mode]
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v3/holiday-mode \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "user_id": "u123",
  "holiday_ends_at": "2026-12-24T09:00:00Z"
}'
```
[/code-tabs]
