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-keyRequest 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 exceptionsnetwork— HTTP request failures or slow responsesmemory— Heap or memory warningssecurity— Vulnerability detectionsapi_log— Server-side API request logsperformance— Core Web Vitals, long tasksconsole— console.error / console.warn captures
Severity levels
info— Informational, no action neededwarning— Potential issue, monitor iterror— Auto-creates a ticketcritical— Auto-creates a ticket, fires alerts
Response
{
"received": 3,
"ticketsCreated": 1,
"ticketsUpdated": 1
}