POST /sites/s_ab12cd34ef56/maintenance
Request examples and the documented response.
Back to this endpoint in the API reference
curl
Request
curl -X POST "https://api.pagehum.com/v1/sites/s_ab12cd34ef56/maintenance" \
-H "Authorization: Bearer $PAGEHUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Database upgrade","note":"Checkout may be unavailable for a few minutes.","startsAt":"2026-10-20T02:00:00Z","endsAt":"2026-10-20T03:00:00Z"}'JavaScript
Request
const response = await fetch("https://api.pagehum.com/v1/sites/s_ab12cd34ef56/maintenance", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PAGEHUM_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"title":"Database upgrade","note":"Checkout may be unavailable for a few minutes.","startsAt":"2026-10-20T02:00:00Z","endsAt":"2026-10-20T03:00:00Z"}),
});
const { ok, data, error } = await response.json();
if (!ok) throw new Error(error);Response
Response
{
"ok": true,
"data": {
"id": "8e3f1b6c-2a7d-4c58-b9e4-1d6a0f7c3e92",
"title": "Database upgrade",
"note": "Checkout may be unavailable for a few minutes.",
"startsAt": 1792461600000,
"endsAt": 1792465200000,
"createdAt": 1791710700000
}
}