Documentation

Documentation

API quick start

Send your first PageLantern API request, list monitors, and create a paused HTTP monitor with curl.

Last updated November 29, 2026

How do I set up an API key?

In PageLantern, open Settings → API keys → Create API key. Select monitors:read for the first request. Add monitors:write if you plan to follow the create example.

Copy the key when it appears and load it into your shell as PAGELANTERN_API_KEY from your secret manager. The examples read that variable. Keep the key out of source code and shared logs.

How do I list my monitors?

Send a GET request with X-API-Key. A successful request returns 200 OK with a JSON array. An empty array means the workspace has no monitors.

List monitors
curl -sS -i "https://pagelantern.com/api/integrations/monitors" \
  -H "X-API-Key: $PAGELANTERN_API_KEY"

How do I create a monitor?

Use a key with monitors:write. Replace the example URL with an endpoint you are authorized to monitor. This request saves a paused HTTP monitor with a five-minute check interval.

The response is 201 Created. Find the new monitor ID in summary.id or at the end of the Location header. When you are ready to start scheduled checks, resume the monitor in PageLantern.

Create a paused monitor
curl -sS -i -X POST "https://pagelantern.com/api/integrations/monitors" \
  -H "X-API-Key: $PAGELANTERN_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "name": "Marketing site",
  "url": "https://example.com",
  "monitorType": "HTTP",
  "intervalSeconds": 300,
  "timeoutMs": 10000,
  "expectedStatus": 200,
  "enabled": false
}
JSON

What if I get an error?

For 401, check that the key is set, valid, and unexpired. For 403, check that the key has the scope the endpoint requires. If creation returns 402, check your workspace’s plan limits.