Update a maintenance window

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

PUT https://api.ap1.datadoghq.com/api/v2/maintenance_windows/{maintenance_window_id}https://api.ap2.datadoghq.com/api/v2/maintenance_windows/{maintenance_window_id}https://api.datadoghq.eu/api/v2/maintenance_windows/{maintenance_window_id}https://api.ddog-gov.com/api/v2/maintenance_windows/{maintenance_window_id}https://api.us2.ddog-gov.com/api/v2/maintenance_windows/{maintenance_window_id}https://api.datadoghq.com/api/v2/maintenance_windows/{maintenance_window_id}https://api.us3.datadoghq.com/api/v2/maintenance_windows/{maintenance_window_id}https://api.us5.datadoghq.com/api/v2/maintenance_windows/{maintenance_window_id}

Overview

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

OAuth apps require the event_correlation_config_write authorization scope to access this endpoint.

Arguments

Path Parameters

Name

Type

Description

maintenance_window_id [required]

string

The UUID of the maintenance window.

Request

Body Data (required)

Maintenance window payload.

Expand All

Field

Type

Description

data [required]

object

Data object for updating a maintenance window.

attributes

object

Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed.

end_at

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

date-time

The start time of the maintenance window.

type [required]

enum

JSON:API resource type for maintenance windows. Allowed enum values: maintenance_window

default: maintenance_window

{
  "data": {
    "attributes": {
      "end_at": "2019-09-19T10:00:00.000Z",
      "name": "string",
      "query": "string",
      "start_at": "2019-09-19T10:00:00.000Z"
    },
    "type": "maintenance_window"
  }
}

Response

OK

Response containing a single maintenance window.

Expand All

Field

Type

Description

data [required]

object

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 [required]

object

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 [required]

date-time

The ISO 8601 timestamp when the maintenance window ends and normal notification behavior resumes.

name [required]

string

A human-readable name for the maintenance window (for example, Database migration - Dec 15).

query [required]

string

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 [required]

date-time

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 [required]

string

The maintenance window's identifier.

type [required]

enum

JSON:API resource type for maintenance windows. Allowed enum values: maintenance_window

default: maintenance_window

{
  "data": {
    "attributes": {
      "created_by": "string",
      "end_at": "2026-06-01T06:00:00Z",
      "name": "Weekly maintenance",
      "query": "project:SEC",
      "start_at": "2026-06-01T00:00:00Z",
      "updated_by": "string"
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "maintenance_window"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  ## default
# 

# Path parameters
export maintenance_window_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/maintenance_windows/${maintenance_window_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z" }, "type": "maintenance_window" } } EOF