Ingest API

Send events directly to the Trovi ingest endpoint.

POST /api/ingest

Send a batch of events to the dashboard.

Authentication

Pass your project API key as a Bearer token:

Authorization: Bearer sk-proj-your-api-key

Request body

{
  "events": [
    {
      "type":        "js_error",
      "severity":    "error",
      "message":     "TypeError: Cannot read properties of null",
      "stack":       "TypeError\n  at handleClick (app.js:42)",
      "metadata":    { "url": "/checkout", "userId": "usr_123" },
      "timestamp":   "2024-01-15T10:30:00.000Z",
      "environment": "production"
    }
  ]
}

Event types

  • js_error — JavaScript exceptions
  • network — HTTP request failures or slow responses
  • memory — Heap or memory warnings
  • security — Vulnerability detections
  • api_log — Server-side API request logs
  • performance — Core Web Vitals, long tasks
  • console — console.error / console.warn captures

Severity levels

  • info — Informational, no action needed
  • warning — Potential issue, monitor it
  • error — Auto-creates a ticket
  • critical — Auto-creates a ticket, fires alerts

Response

{
  "received":       3,
  "ticketsCreated": 1,
  "ticketsUpdated": 1
}