Skip to content

Change a maintenance window

PATCH
/maintenance/{id}
curl --request PATCH \
--url https://dev.tunnelhq.com/api/v1/maintenance/mnt_4 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Project-Id: prj_12' \
--data '{ "start": "2026-11-13T02:00", "end": "2026-11-13T04:00" }'

Changes the fields you send; the rest stay as they are, and the window is checked whole, as when it was made. To switch between once and weekly, send start and end in the new form too (and days for weekly). active: false pauses it: it keeps its settings and does nothing. active: true resumes it.

It needs a role that can mute and pause monitors (Owner, Admin and Manager have it by default).

Need an API key? See Getting an API key.

id
required
string

The window’s id (mnt_4), from List maintenance windows. The bare number (4) works too.

Example
mnt_4
X-Project-Id
required
string

The project, as prj_12 or 12. A workspace key can only reach its own workspace’s projects.

Example
prj_12
Media typeapplication/json

Any of the fields of MaintenanceInput; what you leave out stays as it is.

object
>= 1 properties
title
string
>= 1 characters <= 150 characters
description
string
<= 1000 characters
timezone
string
repeat
string
Allowed values: once weekly
start
string
end
string
days
Array<string>
Allowed values: sun mon tue wed thu fri sat
scope
string
Allowed values: monitors tunnels uptime all
monitor_ids
Array<string>
active

false pauses it, true resumes it.

boolean
Examples

Move it

{
"start": "2026-11-13T02:00",
"end": "2026-11-13T04:00"
}

The changed window.

Media typeapplication/json
object
id
required
string
title
required
string
description
required

The note shown with it; empty for none.

string
active
required

false while it is paused.

boolean
status
required

running now, scheduled for later, ended, or paused. A weekly window can read unknown for a moment while the server schedules it.

string
Allowed values: running scheduled ended paused
repeat
required
string
Allowed values: once weekly
start
required

YYYY-MM-DDTHH:mm for once, HH:mm for weekly, in timezone.

string
end
required

Like start.

string
days
required

The weekdays a weekly window runs; empty for once.

Array<string>
Allowed values: sun mon tue wed thu fri sat
timezone
required
string
scope
required
string
Allowed values: monitors tunnels uptime all
monitor_ids
required

The monitors and groups it covers, for scope: monitors; empty otherwise.

Array<string>
current
required
One of:
object
start
required

In UTC.

string format: date-time
end
required

In UTC.

string format: date-time
next
required
One of:
object
start
required

In UTC.

string format: date-time
end
required

In UTC.

string format: date-time
Examples
Exampledefault

A one-time window

{
"id": "mnt_4",
"title": "Frankfurt servers upgrade",
"description": "",
"active": true,
"status": "scheduled",
"repeat": "once",
"start": "2026-11-12T02:00",
"end": "2026-11-12T04:00",
"days": [],
"timezone": "Europe/Berlin",
"scope": "monitors",
"monitor_ids": [
"srv_42",
"srv_43"
],
"current": null,
"next": {
"start": "2026-11-12T01:00:00.000Z",
"end": "2026-11-12T03:00:00.000Z"
}
}
X-RateLimit-Limit
integer

Requests the workspace’s plan allows per minute.

X-RateLimit-Remaining
integer

Requests left in the current minute.

X-RateLimit-Reset
integer

Unix time, in seconds, when the current minute ends.

A field is unknown or its value isn’t allowed.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 400,
"message": "Unknown field: x. The fields are title, description, timezone, repeat, start, end, days, scope, monitor_ids, active."
}

The API key is missing, wrong, expired, switched off, or no longer valid.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 401,
"message": "API key is required. Provide X-API-Key header or Authorization: Bearer <key>"
}

The role can’t mute and pause monitors.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 403,
"message": "Planning maintenance needs a role that can mute and pause monitors in this project."
}

The project has no maintenance window with this ID.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 404,
"message": "No such maintenance in this project."
}

A usage limit was reached, or this IP address made too many requests with a wrong key.

Usage limits are per workspace and plan: per minute (Retry-After: 60), per day (Retry-After: 3600), and per month (no Retry-After). They use their own body shape. An IP address may send 10 wrong keys a minute; one more is allowed every 6 seconds. While that allowance is used up, every request from the address is refused, even one with a valid key.

Media typeapplication/json
One of:
object
error
required
string
Allowed values: Rate limit exceeded Daily limit exceeded Monthly limit exceeded
message
required
string
retry_after

Seconds to wait. Absent for the monthly limit.

integer
Examples
{
"error": "Rate limit exceeded",
"message": "Per-minute limit of 60 requests exceeded",
"retry_after": 60
}
Retry-After
integer

Seconds to wait. 60 for the per-minute limit, 3600 for the daily limit, 6 after wrong keys. Absent for the monthly limit.

Something failed on TunnelHQ’s side.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 500,
"message": "Internal server error"
}