const url = 'https://app.monitorly.cloud/api/v1/projects/PROJECT_ID/maintenance';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"checkIds":["CHECK_ID"],"schedule":{"endsAt":"2026-12-01T23:00:00Z","kind":"once","startsAt":"2026-12-01T22:00:00Z"},"timezone":"Europe/Berlin","title":"Database upgrade"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.monitorly.cloud/api/v1/projects/PROJECT_ID/maintenance \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "checkIds": [ "CHECK_ID" ], "schedule": { "endsAt": "2026-12-01T23:00:00Z", "kind": "once", "startsAt": "2026-12-01T22:00:00Z" }, "timezone": "Europe/Berlin", "title": "Database upgrade" }'Creates a one-time or weekly window. During a window its checks are in MAINTENANCE: they keep running, open no incidents and send no alerts. Needs the editor role.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The project’s id.
Example
PROJECT_IDHeader Parameters
Section titled “Header Parameters”Any 1–255 characters, for example a UUID per intended action. A retry with the same key and the same request answers the stored response and creates nothing again; the same key with another request answers 422 request.idempotency_key_reused. Keys are kept for 24 hours.
Request Bodyrequired
Section titled “Request Bodyrequired”object
RFC 3339 instants.
object
ISO weekdays (1 = Monday … 7 = Sunday), local start HH:MM or HH:MM:SS in the window’s zone.
object
IANA zone; the workspace’s when absent.
Example
{ "checkIds": [ "CHECK_ID" ], "schedule": { "endsAt": "2026-12-01T23:00:00Z", "kind": "once", "startsAt": "2026-12-01T22:00:00Z" }, "timezone": "Europe/Berlin", "title": "Database upgrade"}Responses
Section titled “Responses”The window.
object
config when a config apply manages the window, ui otherwise. Always sent; optional in the schema
because it was added after the first clients.
The window’s key in a config file; null until a config apply creates or adopts it. Always sent; optional in the schema because it was added after the first clients.
RFC 3339 instants.
object
ISO weekdays (1 = Monday … 7 = Sunday), local start HH:MM or HH:MM:SS in the window’s zone.
object
The running occurrence first (if any), then the next ones; empty once a one-off window is over.
object
The same instants in the window’s zone, with offset.
Example
{ "checkIds": [ "CHECK_ID" ], "createdAt": "2026-11-27T15:20:00Z", "id": "WINDOW_ID", "managedBy": "ui", "projectId": "PROJECT_ID", "schedule": { "endsAt": "2026-12-01T23:00:00Z", "kind": "once", "startsAt": "2026-12-01T22:00:00Z" }, "timezone": "Europe/Berlin", "title": "Database upgrade", "upcoming": [ { "active": false, "endsAt": "2026-12-01T23:00:00Z", "localEndsAt": "2026-12-02T00:00:00", "localStartsAt": "2026-12-01T23:00:00", "startsAt": "2026-12-01T22:00:00Z" } ]}Bad Request.
request.malformed: the body or a parameter is not of the expected shaperequest.idempotency_key_invalid: the key is empty or longer than 255 charactersauth.credentials_conflict: the request carries both a session cookie and a token
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Unauthorized.
auth.unauthenticated,auth.session_expired: no session, or it endedtoken.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Forbidden.
auth.forbidden: your role is too low for thistoken.scope_missing: the token lacks the scope this needs;detailnames itrequest.origin_mismatch,request.header_required: a changing request with a session comes from another site or lacksX-Monitorly-Request: 1
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Not Found.
request.not_found: it does not exist, or you cannot see it
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Payload Too Large.
request.too_large: the body is larger than 256 KiB
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Unprocessable Entity.
field.required,field.too_long,field.invalid: a field breaks a rule;errorspoints at itmaintenance.ends_before_start: window end is not later than its startmaintenance.ends_in_past: one-time window has already endedmaintenance.weekdays_invalid: weekdays are empty, repeated, or outside 1–7maintenance.duration_out_of_range: weekly window duration is outside 1–10080 minutesmaintenance.check_not_in_project: check is not from the window’s project or is repeated
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Too Many Requests.
token.rate_limited: more than 10 requests a second with this tokensession.rate_limited: more than 5 changes a second from your sessionstoken.create_limited: more than 30 resources created within an hour from one token;Retry-Afterin seconds
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Headers
Section titled “Headers”Seconds to wait before trying again.