API reference

Link to the live OpenAPI / Swagger documentation for the ServerMetry API.

View as Markdown

ServerMetry publishes a full OpenAPI 3.1 specification. Use the interactive Swagger UI for request/response schemas, or fetch the raw JSON for code generation.

Live docs

ResourceURL
Swagger UIhttps://api.servermetry.com/docs
OpenAPI JSONhttps://api.servermetry.com/openapi.json

Dev environment:

Check the deployed revision. New endpoints can be available only on Dev before merge.

Auth overview

  • Session / cookie — browser dashboard (better-auth)
  • Server agent key — sp_live_… for agent metrics endpoints
  • MCP key — sp_mcp_… Bearer token for the MCP endpoint (see MCP setup)

Exact auth requirements are documented per operation in Swagger.

Backup pings and batch requests

  • Backup pings authenticate with the secret URL token. That guide describes GET, POST, JSON fields, and status codes.
  • GET /api/v1/websites/checks/recent (ids=<uuid>,<uuid>&limit=40) returns recent checks for up to 100 websites in the current organization. Foreign IDs are ignored. limit controls checks per website: 1–100, default 40.
  • The audit log accepts page, pageSize (1–100, default 25), action, and search (maximum 200 characters). See Dashboard.