Docs
Logs

Send backend logs

Backend logs ship through the same ingestion pipeline as errors. POST one or more events with your server-side API key and they show up in your dashboard, grouped by fingerprint. Useful for capturing exceptions, failed background jobs, webhook errors, or any custom server-side event you want visibility on.

Endpoint

POST https://api.nevision.app/public/errors/ingest
Content-Type: application/json
x-nevision-api-key: YOUR_API_KEY

Server calls authenticate via the x-nevision-api-key header and bypass the browser domain check. Find siteId and the API key in Sites → Install. Keep the key server-side only.

Payload

{
  "siteId": "YOUR_SITE_ID",
  "errors": [
    {
      "type": "uncaught",
      "message": "DB connection refused",
      "fingerprint": "ConnectionError:/api/orders",
      "timestamp": 1719000000000,
      "url": "/api/orders",
      "stack": "Error: ECONNREFUSED ...",
      "filename": "db.ts",
      "lineno": 88
    }
  ]
}

Up to 20 events per request. Stable fingerprint values (e.g. ExceptionClass:route) keep grouping clean.

Code examples

curl -X POST https://api.nevision.app/public/errors/ingest \
  -H "Content-Type: application/json" \
  -H "x-nevision-api-key: YOUR_API_KEY" \
  -d '{
    "siteId": "YOUR_SITE_ID",
    "errors": [{
      "type": "uncaught",
      "message": "Stripe webhook signature invalid",
      "fingerprint": "webhook:stripe:bad-sig",
      "timestamp": '"$(date +%s000)"',
      "url": "/webhooks/stripe"
    }]
  }'

Response

{ "accepted": 1 }

Always 200. If accepted: 0, check the error field (Invalid site, Errors disabled, or limitReached: true when monthly plan quota is exhausted).

Tips

  • Pick stable fingerprints. ExceptionClass:route groups well — including the raw message tends to over-split.
  • Fire-and-forget. Don't block your request path on ingestion — short timeout (5s) or background queue.
  • Batch when you can. Up to 20 events per request, useful in worker / cron contexts.