Uptimeify Docs
Maintenance windows

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": 101 },
    { "type": "dns", "id": 9 }
  ],
  "tagIds": [7, 12],
  "isActive": true
}

Updatable fields

FieldTypeNotes
namestringDisplay label
descriptionstringFree-text notes
startTimeISO 8601 datetimeNew start time
endTimeISO 8601 datetimeNew end time; must be after startTime
isActivebooleanEnable or disable without deleting
isRecurringbooleanToggle recurrence
recurrencePatternobjectReplaces the recurrence pattern; structure identical to create
targets{ type, id }[]Replaces the full set of explicit monitor targets
tagIdsnumber[]Replaces the full set of tag IDs
websiteId / icmpMonitorId / …number | nullLegacy single-target fields
customerIdnumberCustomer 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:

  • customerId cannot be combined with targets, tagIds, or legacy fields.
  • All monitors in targets must 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 by admin or editor users within the organization.

Readonly users in scope

Read-only users assigned to the window's customer may edit maintenance windows scoped to that customer. Global supporter accounts cannot. Readonly users cannot create or update org-wide tag-only windows.

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

StatusDescription
400 (validation)Update would leave the window with no targets, or customerId combined with other target fields. 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 UnauthorizedNot logged in.
403 ForbiddenYou cannot access the window (global supporter accounts cannot edit), or you are a readonly user attempting to set an org-wide tag-only scope.
404 Not FoundNo maintenance window with the given ID exists.
404 { data: { code: "tagNotFound" } }A tagId does not exist in your organization.

On this page