API reference
API keys, authentication, ingestion endpoints, errors, rate limits and pagination.
Base URL
https://api.vitalrix.com/api/v1All 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.
| Preset | Can | Use it for |
|---|---|---|
| Log ingestion | Write logs | Applications sending logs |
| Metrics ingestion | Write metrics | Applications, the infrastructure agent, OpenTelemetry metrics |
| Trace ingestion | Write traces | OpenTelemetry SDKs and Collectors |
| Read-only | Read logs, metrics, traces, monitors, incidents and status pages | Dashboards 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.
# 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
| Data | Request | Key needs |
|---|---|---|
| Logs | POST /logs | Write logs |
| Metrics | POST /metrics | Write metrics |
| OpenTelemetry metrics | POST /metrics/otlp/v1/metrics | Write metrics |
| OpenTelemetry traces | POST /traces/otlp/v1/traces | Write 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
| Endpoint | Returns |
|---|---|
GET /monitors | Monitors with status. Filter by status, type or application. |
GET /incidents | Incidents. Filter by status, severity or application. |
GET /logs | Log search: q, level, service, traceId, from, to, metadata.key=value. |
GET /metrics/query | Time series: name, agg, bucket, groupBy, label.key=value. |
GET /traces | Trace list. GET /traces/:traceId returns the waterfall. |
GET /apm/overview | APM totals, series and top endpoints. Also /apm/services, /apm/endpoints, /apm/errors. |
GET /public/status-pages/:slug | Public 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
// 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.
| HTTP | Code | What to do |
|---|---|---|
| 400 / 422 | VALIDATION_ERROR | Fix the fields listed in details.fieldErrors. |
| 401 | UNAUTHENTICATED, INVALID_API_KEY | Check the key; it may be revoked or expired. |
| 403 | FORBIDDEN | The key or user lacks the permission for this action. |
| 403 | PLAN_LIMIT_REACHED | Your plan’s limit is reached (for example monitors). |
| 404 | NOT_FOUND | Does not exist, or belongs to another organization. |
| 413 | PAYLOAD_TOO_LARGE | Send smaller batches (JSON bodies up to 5 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Send application/json. The OTLP endpoints also take application/x-protobuf. |
| 429 | RATE_LIMITED | Wait for Retry-After seconds, then retry. |
| 503 | SERVICE_UNAVAILABLE | Temporary. 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) andoffset, and return{ items, total, limit, offset }. - Logs and checks use a cursor: pass the previous page's
nextCursorascursor.nextCursor: nullmeans 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.