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": "ef8a6564-0ccf-4f3f-a5ef-d2963176b3eb" },
    { "type": "dns", "id": "5b0d88a6-397d-4acd-b69f-c31405d7d0da" }
  ],
  "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
timezonestringThe 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.
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 only by an organization-wide admin or editor. A customer-bound actor (a readonly user, an editor assigned to customers, a customer-scoped token) receives 403 with data.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 tagIds never 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

StatusDescription
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 UnauthorizedNot logged in.
403 ForbiddenYou 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 FoundNo maintenance window with the given ID exists.
404 { data: { code: "tagNotFound" } }A tagId does not exist in your organization.

On this page