Start maintenance
const url = 'https://example.com/api/monitors/1/start-maintenance';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Deploy","stop_maintenance_after_seconds":1800}'};
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://example.com/api/monitors/1/start-maintenance \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Deploy", "stop_maintenance_after_seconds": 1800 }'Starts a window for the monitor now that ends after stop_maintenance_after_seconds (default 3600, at least 5). With an Idempotency-Key, a retry returns the first window with its original start and end.
Token abilities: maintenance:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The monitor ID
Header Parameters
Section titled “Header Parameters”Optional. One stable key per intended write, reused on every retry of it. A repeat within 24 hours returns the stored response; the same key with a different request returns 409 idempotency_conflict.
Request Body
Section titled “Request Body”object
Example
{ "name": "Deploy", "stop_maintenance_after_seconds": 1800}Responses
Section titled “Responses”The started window. With Idempotency-Key, a repeat returns the first window with its original start and end.
object
UTC, Y-m-d H:i:s.
UTC, Y-m-d H:i:s.
Example
{ "ends_at": "2026-10-01 08:20:00", "id": 501, "monitor_id": 1, "name": "Deploy", "scope": "site", "shared": false, "starts_at": "2026-10-01 07:50:00"}Headers
Section titled “Headers”Requests per minute allowed by the limit this response counts against.
Requests left in the current minute.
Missing, invalid, expired or session-only credentials, or a disabled user.
object
Examples
Missing or invalid token
{ "error": "Unauthenticated."}The token lacks a required ability, or the user’s role or client access does not allow this action.
object
Examples
The token lacks the ability
{ "message": "Invalid ability provided."}Not found or not visible to this token.
object
Examples
Missing or hidden
{ "message": "No query results for model [Heptapod\\Models\\Site] 12"}Domain error.
idempotency_conflict: The Idempotency-Key was used for another operation, target or request.busy_try_again: A change of sites, clients or access was being saved for longer than this write waits for it; retry after Retry-After.
object
Code-specific details; may be empty.
object
Example
{ "code": "idempotency_conflict"}Headers
Section titled “Headers”Seconds to wait before retrying.
Invalid input.
invalid_idempotency_key: Idempotency-Key must be 1 to 128 visible ASCII characters.
object
Field name => messages.
object
object
Code-specific details; may be empty.
object
Examples
Invalid input
{ "errors": { "starts_at": [ "The starts at field must match the format Y-m-d H:i." ] }, "message": "The starts at field must match the format Y-m-d H:i."}Rate limited: 60 requests per minute per source IP before authentication, and 60 per minute per user and per token. See Retry-After.
object
Examples
Rate limited
{ "error": "Too Many Attempts."}Headers
Section titled “Headers”Seconds to wait before retrying.
Unix time when the request limit resets. Only on request rate limits, not on refused manual runs.