LatencySentry is in beta.Checks may be delayed, false positives are possible, and no production SLA is offered yet.
Public API

Use LatencySentry monitor data in Postman, dashboards, and internal tools.

The public API is read-only and versioned under /api/v1. Create an API token in settings, send it as a Bearer token, and fetch project, monitor, and recent check data without signing in through the API.

Quick start

  1. Create an API token in settings.
  2. Copy the full token once when it is shown.
  3. Send it as Authorization: Bearer sls_live_abCDef12_q9Lx7v3n0m2P4r8s1TuV6wXyZaBcDeFgHiJkLmNo.
  4. Call a /api/v1 endpoint.

Authentication

The public API uses API tokens, not Clerk session tokens. You do not sign in through the API. Create a token in settings, then send it in the standard Bearer header format.

curl -X GET https://www.latencysentry.com/api/v1/projects \
  -H "Authorization: Bearer sls_live_abCDef12_q9Lx7v3n0m2P4r8s1TuV6wXyZaBcDeFgHiJkLmNo"

Tokens can optionally be restricted to specific project slugs. A scoped token can only read those projects and the monitors that belong to them.

The settings list shows only a token prefix for identification. A prefix is not a usable API token and will return 401 invalid_api_token.

Endpoints

GET /api/v1/projects

Returns project health summaries visible to the API token.

{
  "projects": [
    {
      "projectSlug": "checkout-api",
      "status": "healthy",
      "monitorCount": 2,
      "healthyCount": 2,
      "downCount": 0,
      "pausedCount": 0,
      "pendingCount": 0,
      "lastCheckedAt": 1770000000000
    }
  ],
  "count": 1
}

GET /api/v1/projects/:projectSlug/monitors

Returns all monitors for one project when the token can access that project.

GET /api/v1/monitors

Returns all monitors visible to the token. Optional query param: projectSlug.

curl "https://www.latencysentry.com/api/v1/monitors?projectSlug=checkout-api" \
  -H "Authorization: Bearer sls_live_abCDef12_q9Lx7v3n0m2P4r8s1TuV6wXyZaBcDeFgHiJkLmNo"

GET /api/v1/monitors/:monitorId

Returns the latest snapshot for one monitor.

{
  "monitorId": "jh7k7g6r5s4t3u2v1w0x9y8z6n7m5b4",
  "name": "Primary API",
  "url": "https://api.example.com/health",
  "projectSlug": "checkout-api",
  "enabled": true,
  "expectedStatus": 200,
  "intervalMinutes": 1,
  "timeoutMs": 10000,
  "lastCheckedAt": 1770000000000,
  "lastStatus": "healthy",
  "lastStatusCode": 200,
  "lastLatencyMs": 124,
  "lastMessage": null,
  "consecutiveFailures": 0
}

GET /api/v1/monitors/:monitorId/checks?limit=10

Returns recent checks for one monitor. Default limit is 10. Maximum limit is 50.

{
  "checks": [
    {
      "checkedAt": 1770000000000,
      "status": "healthy",
      "statusCode": 200,
      "latencyMs": 124,
      "message": null
    }
  ],
  "count": 1
}

Errors

All public API errors use a stable JSON format with machine-readable codes.

{
  "error": "rate_limit_exceeded",
  "message": "Rate limit exceeded. Reduce request frequency and retry shortly."
}

Common status codes

  • 400 invalid query params such as an out-of-range limit
  • 401 missing, invalid, or revoked API token
  • 403 token is valid but cannot access that project or monitor
  • 404 requested project or monitor does not exist in visible scope
  • 429 rate limit or monthly quota exceeded
  • 500 unexpected server error

Error codes

  • missing_api_token
  • invalid_api_token
  • revoked_api_token
  • project_forbidden
  • monitor_forbidden
  • project_not_found
  • monitor_not_found
  • invalid_limit
  • rate_limit_exceeded
  • monthly_quota_exceeded

Rate limits and quotas

Limits are tied to the plan behind the workspace. They are designed to support real integrations, not just occasional manual testing.

Free

  • 120 requests per minute
  • 240 burst requests per 10-second window
  • 100,000 requests per month

Pro

  • 600 requests per minute
  • 1,200 burst requests per 10-second window
  • 2,000,000 requests per month

Successful responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. If you need higher volume, contact support instead of trying to work around the limits.

Versioning

The customer-facing contract lives under /api/v1. Existing non-versioned internal routes can continue serving product integrations, but user-facing integrations should treat /api/v1 as the stable public namespace. Future breaking changes will ship under a new version such as /api/v2.