PATCH /sites/s_ab12cd34ef56/maintenance/8e3f1b6c-2a7d-4c58-b9e4-1d6a0f7c3e92
Request examples and the documented response.
Back to this endpoint in the API reference
curl
Request
curl -X PATCH "https://api.pagehum.com/v1/sites/s_ab12cd34ef56/maintenance/8e3f1b6c-2a7d-4c58-b9e4-1d6a0f7c3e92" \
-H "Authorization: Bearer $PAGEHUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"note":"Checkout and accounts may be unavailable for up to 20 minutes."}'JavaScript
Request
const response = await fetch("https://api.pagehum.com/v1/sites/s_ab12cd34ef56/maintenance/8e3f1b6c-2a7d-4c58-b9e4-1d6a0f7c3e92", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.PAGEHUM_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"note":"Checkout and accounts may be unavailable for up to 20 minutes."}),
});
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 and accounts may be unavailable for up to 20 minutes.",
"startsAt": 1792461600000,
"endsAt": 1792465200000,
"createdAt": 1791710700000
}
}