Skip to content

API reference

API keys, authentication, ingestion endpoints, errors, rate limits and pagination.

Base URL

Base URL
https://api.vitalrix.com/api/v1

All requests use HTTPS and JSON. Every response carries an x-request-id header; include it when you contact support. Send your own x-request-id to connect our logs with yours.

API keys

Create keys in Settings › API keys. A key belongs to one organization and holds only the permissions you pick, never more than you have yourself.

API key presets
PresetCanUse it for
Log ingestionWrite logsApplications sending logs
Metrics ingestionWrite metricsApplications, the infrastructure agent, OpenTelemetry metrics
Trace ingestionWrite tracesOpenTelemetry SDKs and Collectors
Read-onlyRead logs, metrics, traces, monitors, incidents and status pagesDashboards and reporting scripts
  • The key is shown once when you create it. VitalRix stores only a hash, so a lost key cannot be recovered: create a new one.
  • Keys can have an expiry date. A revoked key stops working at once.
  • Use separate keys per environment and per purpose, so you can revoke one without touching the others.
Authenticate
# With an API key
curl https://api.vitalrix.com/api/v1/monitors -H "x-api-key: pk_your_key"

# The same key as a bearer token
curl https://api.vitalrix.com/api/v1/monitors -H "Authorization: Bearer pk_your_key"

Ingestion endpoints

Ingestion endpoints
DataRequestKey needs
LogsPOST /logsWrite logs
MetricsPOST /metricsWrite metrics
OpenTelemetry metricsPOST /metrics/otlp/v1/metricsWrite metrics
OpenTelemetry tracesPOST /traces/otlp/v1/tracesWrite traces

Details and examples: Logs, Metrics, Traces. OpenTelemetry endpoints (traces, metrics and logs) accept OTLP/HTTP, protobuf or JSON; for gRPC use the Collector.

Reading data

Common read endpoints
EndpointReturns
GET /monitorsMonitors with status. Filter by status, type or application.
GET /incidentsIncidents. Filter by status, severity or application.
GET /logsLog search: q, level, service, traceId, from, to, metadata.key=value.
GET /metrics/queryTime series: name, agg, bucket, groupBy, label.key=value.
GET /tracesTrace list. GET /traces/:traceId returns the waterfall.
GET /apm/overviewAPM totals, series and top endpoints. Also /apm/services, /apm/endpoints, /apm/errors.
GET /public/status-pages/:slugPublic status page data. No key needed.

AI agents (MCP)

The same API is available to AI agents through the Model Context Protocol at https://api.vitalrix.com/api/v1/mcp (Streamable HTTP, JSON-RPC). Agents sign in with OAuth 2.1: discovery is at /.well-known/oauth-protected-resource/api/v1/mcp and /.well-known/oauth-authorization-server on the API host, and a request without a token is answered 401 with a WWW-Authenticate header pointing there. An API key sent as Authorization: Bearer pk_… also works. MCP is off until an admin turns it on. See AI agents (MCP).

Responses and errors

Response envelope
// Success
{ "success": true, "data": { ... } }

// Error
{ "success": false,
  "error": { "code": "VALIDATION_ERROR", "message": "level: Invalid enum value",
             "requestId": "req_...", "details": { "fieldErrors": { "level": ["..."] } } } }

code is stable and meant for programs; message is for people and may change.

Common error codes
HTTPCodeWhat to do
400 / 422VALIDATION_ERRORFix the fields listed in details.fieldErrors.
401UNAUTHENTICATED, INVALID_API_KEYCheck the key; it may be revoked or expired.
403FORBIDDENThe key or user lacks the permission for this action.
403PLAN_LIMIT_REACHEDYour plan’s limit is reached (for example monitors).
404NOT_FOUNDDoes not exist, or belongs to another organization.
413PAYLOAD_TOO_LARGESend smaller batches (JSON bodies up to 5 MB).
415UNSUPPORTED_MEDIA_TYPESend application/json. The OTLP endpoints also take application/x-protobuf.
429RATE_LIMITEDWait for Retry-After seconds, then retry.
503SERVICE_UNAVAILABLETemporary. Retry with backoff.

Rate limits

  • 1,200 requests per minute per API key or user.
  • Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (unix seconds).
  • A rejected request gets 429 with Retry-After in seconds.
  • Logs also have an organization budget of 100,000 entries per minute; traces have a per-organization span budget.

Pagination

  • Most lists take limit (1 to 200, default 50) and offset, and return { items, total, limit, offset }.
  • Logs and checks use a cursor: pass the previous page's nextCursor as cursor. nextCursor: null means the end. Cursors stay valid while new data arrives.

Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.