---
title: "Update a maintenance window"
method: PUT
path: "/api/v2/maintenance_windows/{maintenance_window_id}"
tags: ["Case Management"]
---

# Update a maintenance window

`PUT /api/v2/maintenance_windows/{maintenance_window_id}`

Updates the name, query, start time, or end time of an existing maintenance window.

## Path parameters

- `maintenance_window_id` string, required

## Request body

- MaintenanceWindowUpdateRequest — Request payload for updating a maintenance window.
  - `data` MaintenanceWindowUpdate, required — Data object for updating a maintenance window.
    - `attributes` MaintenanceWindowUpdateAttributes — Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed.
      - `end_at` string, date-time — The end time of the maintenance window.
      - `name` string — The name of the maintenance window.
      - `query` string — The query to filter event management cases for this maintenance window.
      - `start_at` string, date-time — The start time of the maintenance window.
    - `type` 'maintenance_window', required — JSON:API resource type for maintenance windows.

## Response `200`

OK

- MaintenanceWindowResponse — Response containing a single maintenance window.
  - `data` MaintenanceWindow, required — A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query.
    - `attributes` MaintenanceWindowAttributes, required — Attributes of a maintenance window, including its schedule and the query that determines which cases are affected.
      - `created_by` string — The UUID of the user who created this maintenance window. Read-only.
      - `end_at` string, date-time, required — The ISO 8601 timestamp when the maintenance window ends and normal notification behavior resumes.
      - `name` string, required — A human-readable name for the maintenance window (for example, `Database migration - Dec 15`).
      - `query` string, required — A case search query that determines which cases are affected during the maintenance window. Uses the same syntax as the Case Management search bar.
      - `start_at` string, date-time, required — The ISO 8601 timestamp when the maintenance window begins and notifications start being suppressed.
      - `updated_by` string — The UUID of the user who last modified this maintenance window. Read-only.
    - `id` string, required — The maintenance window's identifier.
    - `type` 'maintenance_window', required — JSON:API resource type for maintenance windows.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/versions/da68bf029e4c/schema)
