`POST /api/v1/maintenance-windows` — create a maintenance window (Admin only).
POST
/api/v1/maintenance-windows
const url = 'https://example.com/api/v1/maintenance-windows';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"ends_at":1,"reason":"example","starts_at":1}'};
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/v1/maintenance-windows \ --header 'Content-Type: application/json' \ --data '{ "ends_at": 1, "reason": "example", "starts_at": 1 }'Request Body required
Section titled “Request Body required ” Media type application/json
Request body for POST /api/v1/maintenance-windows.
object
ends_at
required
UTC end time, Unix timestamp in seconds.
integer format: int64
reason
required
Operator-provided reason for the window.
string
starts_at
required
UTC start time, Unix timestamp in seconds.
integer format: int64
Example generated
{ "ends_at": 1, "reason": "example", "starts_at": 1}Responses
Section titled “ Responses ”Maintenance window created
Media type application/json
Response body for a single maintenance window.
object
created_by
required
string
ends_at
required
integer format: int64
id
required
string
reason
required
string
starts_at
required
integer format: int64
Example generated
{ "created_by": "example", "ends_at": 1, "id": "example", "reason": "example", "starts_at": 1}Invalid request body
Admin role required