1. Get an API key

From your dashboard, go to Settings → API Keys and create one. The key is shown once at creation time — copy it somewhere safe, MonitorFree never displays it again (only the first few characters, for identification, once you leave the page). Keys are read-only: they can pull data about your account, but can't change settings, add servers, or acknowledge alerts.

2. Authenticate your requests

Every API key starts with mfk_. Send it as a Bearer token in the Authorization header on every request:

curl https://api.monitorfree.com/servers \
  -H "Authorization: Bearer mfk_your_key_here"

A missing or invalid key returns 401. A revoked key stops working immediately — revoking is instant, not just hidden from the UI.

3. Endpoints

All endpoints are read-only GET requests and return JSON.

Servers

EndpointReturns
GET/serversAll servers on your account
GET/servers/usagePlan/usage summary (servers used vs. limit)
GET/servers/{id}Detail for one server
GET/servers/{id}/metrics?range=24hTime-series CPU/mem/disk/network history (range: 1h, 6h, 24h, 7d — clamped to your plan's retention)
GET/servers/{id}/uptimeUptime history
GET/servers/{id}/processesTop processes snapshot
GET/servers/{id}/disk-partitionsPer-partition disk usage
GET/servers/{id}/docker-containersRunning containers, if Docker is detected
GET/servers/{id}/network-interfacesNetwork interface stats
GET/servers/{id}/listening-portsOpen/listening ports
GET/servers/{id}/export?format=csv&range=7dRaw metrics export (format: csv or json)
GET/servers/{id}/audit-logServer activity log (logins, config changes, sessions)

Alerts

EndpointReturns
GET/alerts/{server_id}/rulesAlert rules configured on a server
GET/alerts/{server_id}/eventsAlert firing history for a server
GET/alerts/events/{event_id}/timelineDetail timeline for a single alert event

4. Example: pulling metrics into your own dashboard

curl "https://api.monitorfree.com/servers/<server_id>/metrics?range=24h" \
  -H "Authorization: Bearer mfk_your_key_here"

Returns an array of samples (timestamp, CPU%, memory, disk, network, load average) — enough to feed a Grafana JSON/infinity datasource, a cron script, or your own alerting on top of ours.

5. Rate limits

There's no separate per-key rate limit today — requests are subject to the same general per-IP limits as the rest of the API. In practice this means: don't poll faster than once every few seconds per endpoint. If you're building something that needs tighter limits raised, contact us.

Questions, or want a use case we don't cover yet (webhooks, write access, bulk export)? Get in touch — this is a young API and we prioritize based on what people actually ask for.