PATCH /sites/s_ab12cd34ef56/goals
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/goals" \
-H "Authorization: Bearer $PAGEHUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"g_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","active":false}'JavaScript
Request
const response = await fetch("https://api.pagehum.com/v1/sites/s_ab12cd34ef56/goals", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.PAGEHUM_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"id":"g_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","active":false}),
});
const { ok, data, error } = await response.json();
if (!ok) throw new Error(error);Response
Response
{
"ok": true,
"data": {
"updated": true
}
}