Documentation
Log ingestion API
Send API request logs from any service to Zicroe with a single HTTP POST. Errors are analysed against your linked repository automatically.
Overview#
Every log belongs to an application, identified by that application's API key. Create an account, add a project, an environment and an application, then copy the application's key from Ingestion keys.
- 1Create an application
- 2Copy its API key
- 3POST a log per request
Endpoint#
POSThttps://api.zicroe.com/api/logs
Authentication#
Put the application API key in the X-API-Key header. The key identifies the application, so you don't send an applicationId in the body.
Headerhttp
X-API-Key: YOUR_APPLICATION_API_KEYKeep the key server-side in an environment variable such as
ZICROE_API_KEY. Never ship it in browser code or commit it to source control.Fields#
| Field | Type | Description |
|---|---|---|
| timestamprequired | string · ISO 8601 | When the request completed. |
| methodrequired | string | HTTP method — GET, POST, PUT, PATCH, DELETE… |
| endpointrequired | string | Request path or route, e.g. /api/checkout. |
| statusCoderequired | integer | HTTP status code of the response. |
| responseTimerequired | integer · ms | Round-trip time in milliseconds. |
| requestId | string | Your correlation or trace ID. |
| ipAddress | string | Client IP address. |
| userAgent | string | Client user agent. |
| errorMessage | string | Error details for failed requests. |
| stack | string | Full exception stack trace (err.stack in Node, traceback.format_exc() in Python). Strongly recommended for errors — it pins the source files analysis looks at. |
| metadata | object | Any JSON you want kept with the log. |
Request body#
Example payloadjson
{
"timestamp": "2026-06-11T14:30:00.000Z",
"method": "POST",
"endpoint": "/api/checkout",
"statusCode": 500,
"responseTime": 142,
"requestId": "req_abc123",
"errorMessage": "Cannot read property 'email' of null",
"stack": "TypeError: Cannot read property 'email' of null\n at checkout (src/routes/checkout.js:48:22)\n at Layer.handle [as handle_request] (node_modules/express/lib/router/layer.js:95:5)",
"metadata": {
"orderId": "ord_123",
"region": "us-east-1"
}
}Examples#
curl -X POST https://api.zicroe.com/api/logs \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_APPLICATION_API_KEY" \
-d '{"timestamp":"2026-06-11T14:30:00.000Z","method":"POST","endpoint":"/api/checkout","statusCode":500,"responseTime":142,"requestId":"req_abc123","errorMessage":"Cannot read property 'email' of null","stack":"TypeError: Cannot read property 'email' of null\n at checkout (src/routes/checkout.js:48:22)","metadata":{"orderId":"ord_123"}}'Responses#
201 Created— the log was stored; the body contains the saved entry.400 Bad Request— a required field is missing or has the wrong type.401 Unauthorized— theX-API-Keyheader is missing, wrong, or was regenerated.
Best practices#
- Send the log after the request completes, so status and response time are accurate.
- For failures, include
errorMessageandstackfrom your language's native error — it dramatically improves diagnosis and patch quality. - Use
requestIdto correlate Zicroe logs with your own tracing or error reporting. - Send logs asynchronously or with a short timeout so ingestion never slows your responses.
- Regenerating an application's key in the dashboard invalidates the previous key immediately.