Update Maintenance Window
Partially updates a maintenance window. All fields are optional; only supplied fields are changed. When targets or tagIds are provided they replace the existing selection entirely.
PATCH /api/maintenance-windows/{id}
Path Parameters
id(required): The numeric ID of the maintenance window to update.
Body
All fields are optional. Omit a field to leave it unchanged.
{
"name": "Extended deployment window",
"endTime": "2026-07-11T03:00:00.000Z",
"targets": [
{ "type": "website", "id": "ef8a6564-0ccf-4f3f-a5ef-d2963176b3eb" },
{ "type": "dns", "id": "5b0d88a6-397d-4acd-b69f-c31405d7d0da" }
],
"tagIds": [7, 12],
"isActive": true
}Updatable fields
| Field | Type | Notes |
|---|---|---|
name | string | Display label |
description | string | Free-text notes |
startTime | ISO 8601 datetime | New start time |
endTime | ISO 8601 datetime | New end time; must be after startTime |
isActive | boolean | Enable or disable without deleting |
isRecurring | boolean | Toggle recurrence |
recurrencePattern | object | Replaces the recurrence pattern; structure identical to create |
timezone | string | The IANA zone (e.g. "Europe/Berlin") the recurrence pattern is interpreted in. Case-insensitive spellings and legacy IANA link names (e.g. "gmt", "Zulu") are accepted and stored under the runtime's canonical name, "utc" and "Zulu" are both stored as "UTC". A raw UTC offset (e.g. "+05:00") is rejected: it carries no daylight-saving rule, so it cannot express what a zone name does. |
targets | { type, id }[] | Replaces the full set of explicit monitor targets. id is the monitor's public id (UUID); a numeric row id is still accepted. |
tagIds | number[] | Replaces the full set of tag IDs |
websiteId / icmpMonitorId / … | number | null | Legacy single-target fields |
customerId | number | Customer anchor (only for tag-only windows) |
Replace semantics for targets and tagIds
When targets or tagIds is included in the request body, the entire existing selection for that field is replaced. To remove all explicit targets send "targets": []; to remove all tags send "tagIds": [].
Combination rules
PATCH validates target and tag scope using the same resolver as create, but does not re-run the create-time Zod superRefine. In practice:
customerIdcannot be combined withtargets,tagIds, or legacy fields.- All monitors in
targetsmust belong to the same customer; mixing returns{ data: { code: "mixedCustomers" } }. - An org-wide tag-only window (tags without
customerId,targets, or legacy fields) can be edited only by an organization-wide admin or editor. A customer-bound actor (areadonlyuser, aneditorassigned to customers, a customer-scoped token) receives403withdata.code: customerScopedTokenForbidden, whatever it sends. - A window that already belongs to a customer stays with that customer: the existing customer seeds the resolver, so adding
tagIdsnever turns it org-wide.
Readonly users in scope
Read-only users assigned to the window's customer may edit maintenance windows scoped to that customer (readonly is the customer self-service role, see Roles and the customer scope). Global supporter accounts cannot. No customer-bound actor, readonly or otherwise, can update an org-wide tag-only window.
Example (cURL)
BASE_URL="https://uptimeify.io"
TOKEN="<your-api-token>"
curl -X PATCH "$BASE_URL/api/maintenance-windows/42" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"isActive": false}'Response
Returns the updated maintenance window object in the same shape as Get Maintenance Window.
Common errors
| Status | Description |
|---|---|
400 (validation) | Update would leave the window with no targets, customerId combined with other target fields, or timezone is a raw UTC offset or not a zone name the runtime recognizes. These are Zod validation errors; the response body is a standard validation error, not { data: { code } }. |
400 { data: { code: "mixedCustomers" } } | targets contains monitors from different customers. |
400 { data: { code: "mixedTagOrganizations" } } | tagIds contains tags from different organizations. |
401 Unauthorized | Not logged in. |
403 Forbidden | You cannot access the window (global supporter accounts cannot edit). |
403 { data: { code: "customerScopedTokenForbidden" } } | The window is org-wide and you are a customer-bound actor (readonly user, editor with customer assignments, customer-scoped token). |
404 Not Found | No maintenance window with the given ID exists. |
404 { data: { code: "tagNotFound" } } | A tagId does not exist in your organization. |