List all maintenance windows
Retrieve maintenance windows across all projects, or filter by project_id. Use unassigned for windows without a project.
Requires MAINTENANCE_WINDOWS:READ.
Header parameters
Query parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns a list of maintenance windows. May also return a canonical failure envelope with success: false at HTTP200. |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized - Invalid or missing API token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Project not found |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
Request
curl --request GET \
--url https://api.onlineornot.com/v1/maintenance-windows \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": [
{
"project_id": "a1b2c3d4e5f6g7h8",
"id": "abc123def456",
"name": "Weekly Maintenance",
"start_date": "2026-09-13T09:00:00.000Z",
"duration_minutes": 60,
"timezone": "America/New_York",
"days_of_week": [
"MONDAY",
"WEDNESDAY",
"FRIDAY"
],
"status": "ENABLED"
}
],
"result_info": {
"page": 1,
"per_page": 20,
"count": 1,
"total_count": 1
},
"success": true,
"errors": [],
"messages": []
}
Create a new maintenance window
Create a maintenance window. Omitted or null project_id leaves it unassigned. Every selected check and heartbeat must belong to the same organisation and project.
Requires MAINTENANCE_WINDOWS:EDIT.
Header parameters
Body parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 201 | Created | Returns the created maintenance window |
| 400 | Bad Request | Bad Request - Invalid input (e.g., invalid check/heartbeat IDs, empty name) |
| 401 | Unauthorized | Unauthorized - Invalid or missing API token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Project or maintenance target not found |
| 409 | Conflict | Maintenance targets must belong to the same project as the window |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
Request
curl --request POST \
--url https://api.onlineornot.com/v1/maintenance-windows \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"name":"Weekly Server Maintenance","start_date":"2026-09-13T03:00:00.000Z","duration_minutes":60,"timezone":"America/New_York","days_of_week":["SUNDAY"]}'
Response
{
"result": {
"project_id": "a1b2c3d4e5f6g7h8",
"id": "abc123def456",
"name": "Weekly Maintenance",
"start_date": "2026-09-13T09:00:00.000Z",
"duration_minutes": 60,
"timezone": "America/New_York",
"days_of_week": [
"MONDAY",
"WEDNESDAY",
"FRIDAY"
],
"status": "ENABLED",
"checks": [
"abc123",
"def456"
],
"heartbeats": [
"ghi789"
]
},
"success": true,
"errors": [],
"messages": []
}
Get a maintenance window by ID
Retrieve a maintenance window with associated checks and heartbeats
Requires MAINTENANCE_WINDOWS:READ.
Header parameters
Path parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns a maintenance window with associated check and heartbeat IDs |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized - Invalid or missing API token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Not Found - Maintenance window does not exist or belongs to different organization |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
Request
curl --request GET \
--url https://api.onlineornot.com/v1/maintenance-windows/abc123def456 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"project_id": "a1b2c3d4e5f6g7h8",
"id": "abc123def456",
"name": "Weekly Maintenance",
"start_date": "2026-09-13T09:00:00.000Z",
"duration_minutes": 60,
"timezone": "America/New_York",
"days_of_week": [
"MONDAY",
"WEDNESDAY",
"FRIDAY"
],
"status": "ENABLED",
"checks": [
"abc123",
"def456"
],
"heartbeats": [
"ghi789"
]
},
"success": true,
"errors": [],
"messages": []
}
Update a maintenance window
Update a maintenance window. All fields are optional - only provided fields will be updated. Updating checks or heartbeats replaces existing associations and requires the same project assignment. Assignment changes use the move operation.
Requires MAINTENANCE_WINDOWS:EDIT.
Header parameters
Path parameters
Body parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns the updated maintenance window |
| 400 | Bad Request | Bad Request - Invalid input (e.g., invalid check/heartbeat IDs, no fields to update) |
| 401 | Unauthorized | Unauthorized - Invalid or missing API token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Not Found - Maintenance window does not exist or belongs to different organization |
| 409 | Conflict | Maintenance targets must belong to the same project as the window |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
Request
curl --request PATCH \
--url https://api.onlineornot.com/v1/maintenance-windows/abc123def456 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"name":"Updated Maintenance Window"}'
Response
{
"result": {
"project_id": "a1b2c3d4e5f6g7h8",
"id": "abc123def456",
"name": "Weekly Maintenance",
"start_date": "2026-09-13T09:00:00.000Z",
"duration_minutes": 60,
"timezone": "America/New_York",
"days_of_week": [
"MONDAY",
"WEDNESDAY",
"FRIDAY"
],
"status": "ENABLED",
"checks": [
"abc123",
"def456"
],
"heartbeats": [
"ghi789"
]
},
"success": true,
"errors": [],
"messages": []
}
Delete a maintenance window
Delete a maintenance window and all its associations with checks and heartbeats
Requires MAINTENANCE_WINDOWS:EDIT.
Header parameters
Path parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns the deleted maintenance window ID |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized - Invalid or missing API token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Not Found - Maintenance window does not exist or belongs to different organization |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
Request
curl --request DELETE \
--url https://api.onlineornot.com/v1/maintenance-windows/abc123def456 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"id": "abc123def456"
},
"success": true,
"errors": [],
"messages": []
}
Assign or unassign a maintenance window
The window and all its checks and heartbeats must retain the same assignment. Use the atomic resources move to select linked resources together.
Requires MAINTENANCE_WINDOWS:EDIT.
Header parameters
Path parameters
Body parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Moved resource and destination |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Missing or invalid credentials |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource or project not found |
| 409 | Conflict | Move would break variable references, create a name conflict, or separate maintenance windows from their targets |
| 500 | Internal Server Error | Internal server error |
Response Schema
Request
curl --request POST \
--url https://api.onlineornot.com/v1/maintenance-windows/abc123def456/move \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"project_id":"a1b2c3d4e5f6g7h8"}'
Response
{
"result": {
"id": "string",
"project_id": "a1b2c3d4e5f6g7h8"
},
"success": true,
"errors": [],
"messages": []
}