POST /invites/accept
Request examples and the documented response.
Back to this endpoint in the API reference
curl
Request
curl -X POST "https://api.pagehum.com/v1/invites/accept" \
-H "Authorization: Bearer $PAGEHUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"https://pagehum.com/invite/phi_Xq3vN8sLr2KdY7mWcT5pHjB0aZ1eUo4f"}'JavaScript
Request
const response = await fetch("https://api.pagehum.com/v1/invites/accept", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PAGEHUM_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"token":"https://pagehum.com/invite/phi_Xq3vN8sLr2KdY7mWcT5pHjB0aZ1eUo4f"}),
});
const { ok, data, error } = await response.json();
if (!ok) throw new Error(error);Response
Response
{
"ok": true,
"data": {
"siteId": "s_ab12cd34ef56",
"role": "editor"
}
}