---
title: "Create a maintenance window"
method: POST
path: "/maintenance-windows"
tags: ["Maintenance Windows"]
---

# Create a maintenance window

`POST /maintenance-windows`

Create a maintenance window

## Request body

- CreateMaintenanceWindowDto
  - `name` string, required — Friendly name of the maintenance window
  - `autoAddMonitors` boolean — If true, all monitors are automatically added to this maintenance window
  - `interval` 'once' | 'daily' | 'weekly' | 'monthly', required
  - `date` string, required — Start date of the maintenance window in YYYY-MM-DD format (years 19xx or 20xx only)
  - `time` string, required — Start time of the maintenance window in HH:mm:ss format
  - `duration` number, required — Duration of the maintenance window in minutes. Maintenance window will be active for this duration
  - `days` number[] — (only needed for weekly and monthly maintenance windows). E.g. [2, 4, 5] for Tuesday, Thursday and Friday or [10, 17, 26] for the days of the month. -1 for last day of the month)
  - `monitorIds` number[] — List of monitor IDs to be assigned to the maintenance window

## Response `201`

- MaintenanceWindowDto
  - `id` number, required
  - `userId` number, required
  - `name` string, required
  - `interval` 'once' | 'daily' | 'weekly' | 'monthly', required
  - `date` string, nullable, required
  - `time` string, required
  - `duration` number, required
  - `autoAddMonitors` boolean, required
  - `monitorIds` number[], required
  - `days` number[], required
  - `status` 'active' | 'paused', required
  - `created` union, required
    - unknown
    - string

---

[API](https://skmtc.net/uptimerobot/apis/uptimerobot-api.md) · [All operations](https://skmtc.net/uptimerobot/apis/uptimerobot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uptimerobot/uptimerobot-api/revisions/2b6fa8c427ba/schema)
