POST /sites/s_ab12cd34ef56/incidents/0b7d5e21-93c4-4f6a-8e12-5a9c7d3b1f68/updates
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/incidents/0b7d5e21-93c4-4f6a-8e12-5a9c7d3b1f68/updates" \
-H "Authorization: Bearer $PAGEHUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"resolved","message":"A fix is live and checkouts are going through."}'JavaScript
Request
const response = await fetch("https://api.pagehum.com/v1/sites/s_ab12cd34ef56/incidents/0b7d5e21-93c4-4f6a-8e12-5a9c7d3b1f68/updates", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PAGEHUM_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"status":"resolved","message":"A fix is live and checkouts are going through."}),
});
const { ok, data, error } = await response.json();
if (!ok) throw new Error(error);Response
Response
{
"ok": true,
"data": {
"id": "0b7d5e21-93c4-4f6a-8e12-5a9c7d3b1f68",
"title": "Checkout errors for some visitors",
"impact": "partial",
"createdAt": 1791710700000,
"resolvedAt": 1791712500000,
"updates": [
{
"id": "c41a8f02-6d3e-4b95-a7c1-9e2f5b8d4a37",
"status": "investigating",
"message": "Some visitors see an error at checkout. We're looking into it.",
"at": 1791710700000
},
{
"id": "c41a8f02-6d3e-4b95-a7c1-9e2f5b8d4a37",
"status": "resolved",
"message": "A fix is live and checkouts are going through.",
"at": 1791712500000
}
]
}
}