DocsAPI referenceAll pages

POST /sites/s_ab12cd34ef56/markers

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/markers" \
  -H "Authorization: Bearer $PAGEHUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"v1.4.2: new checkout","kind":"deploy"}'

JavaScript

Request

const response = await fetch("https://api.pagehum.com/v1/sites/s_ab12cd34ef56/markers", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PAGEHUM_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({"text":"v1.4.2: new checkout","kind":"deploy"}),
});
const { ok, data, error } = await response.json();
if (!ok) throw new Error(error);

Response

Response

{
  "ok": true,
  "data": {
    "id": "6f0e2c8a-4b1d-4e7a-9c35-2d8f1a7b9e40",
    "at": 1791710700000,
    "kind": "deploy",
    "text": "v1.4.2: new checkout",
    "source": "api",
    "createdAt": 1791710700000
  }
}