Skip to main content

API Reference

REST API for programmatic log ingestion and analysis retrieval.

API access requires Starter plan or higher. Generate keys from Dashboard โ†’ Settings โ†’ API Keys.

Base URL

https://app.errorlens.ai

On a self-hosted deployment, replace this with your NEXT_PUBLIC_APP_URL.

Authentication

Send your API key in the x-api-key header on every request. Keys start with the prefix el_live_.

x-api-key: el_live_your_key_here

POST /api/connectors/ingest

Submit a log payload for analysis. The analysis runs asynchronously โ€” fetch the result with the dashboard or with GET /api/analysis/:id using a session token.

// Request โ€” application/json { "logs": "string", // required, max 200 KB "title": "string", // optional, max 255 chars "source": "string" // optional free-form label, e.g. "k8s-prod" } // Response 202 (Accepted) { "received": true, "analysisId": "uuid" }

Per-key rate limit: 100 requests / minute. Exceeding it returns 429 with a Retry-After header.

GET /api/analysis

List recent analyses for the authenticated user. Use a session bearer token from the dashboard, not an API key โ€” this endpoint is intended for the web app.

Authorization: Bearer <session-jwt> // Response 200 { "analyses": [ { "id": "uuid", "title": "string", "status": "pending|processing|completed|failed", "severity": "critical|high|medium|low|info|null", "input_format": "txt|json|log|sql|...", "created_at": "ISO 8601" } ], "hasMore": false, "nextCursor": "ISO 8601 | null" }

GET /api/analysis/:id

Fetch a single analysis with the AI result fields flattened to the top level.

Authorization: Bearer <session-jwt> // Response 200 { "analysis": { "id": "uuid", "title": "string", "description": "string | null", "status": "completed", "input_format": "txt | sql | json | ...", "severity": "critical", "summary": "Brief 1โ€“2 sentence summary", "root_cause": "Detailed root-cause explanation", "suggested_fix": "Concrete fix with code", "affected_services": ["string"], "occurrences": 148, "error_log": "Original input (omitted with ?poll=1)", "created_at": "ISO 8601", "updated_at": "ISO 8601" } }

Pass ?poll=1 on repeat requests during status polling โ€” the response will skip the up-to-100KB error_log field.

Error codes

400 Bad Request โ€” missing or invalid request body 401 Unauthorized โ€” invalid or missing API key / session token 403 Forbidden โ€” plan does not include API access 429 Too Many Requests โ€” per-IP or per-key rate limit exceeded (Retry-After header included) 500 Internal Error โ€” server-side failure, safe to retry after 30s

Rate limits

The ingest endpoint is rate-limited per API key:

Free: Not available (Starter or higher required) Starter: 100 req/min per key Pro: 100 req/min per key Team: 100 req/min per key Enterprise: Custom โ€” contact sales

Outbound webhooks (integrations)

ErrorLens does not currently expose a registration endpoint for webhooks. To receive analysis.completed events on your own server, configure a Custom Webhook integration from Dashboard โ†’ Integrations โ€” ErrorLens will then POST a signed JSON payload to your URL whenever an analysis completes.

// Headers Content-Type: application/json X-ErrorLens-Signature: sha256=<hmac of body using your shared secret> // Payload { "event": "analysis.completed", "analysisId": "uuid", "title": "string", "url": "https://app.errorlens.ai/dashboard/analysis/<id>", "result": { "severity": "critical", "summary": "string", "rootCause": "string", "suggestedFix": "string", "affectedServices": ["string"], "occurrences": 148, "language": "Java", "framework": "Spring Boot" }, "user": { "id": "uuid", "email": "string", "plan": "pro" }, "receivedAt": "ISO 8601" }

Verify the X-ErrorLens-Signature header by recomputing hmac-sha256(body, sharedSecret) and comparing with constant-time equality.

SDKs

Official SDKs are on the roadmap; for now, calling the REST API directly with fetch /curl / requests is supported on every plan. See the quick-start guide for ready-to-paste examples in five languages.

Generate your API key โ†’Manage existing keysRead the docs