Logs API
Send structured log events. Requires a logs key. Accepts one event, an array, or { "logs": [...] } (batch up to 100).
POST
/api/v1/logsFields
| Field | Type | Notes |
|---|---|---|
| level | string | debug · info · warn · error (default info) |
| name | string | Required. Event name, ≤ 200 chars |
| message | string | Optional human message, ≤ 4000 chars |
| metadata | object | Optional arbitrary JSON object |
| traceId | string | Optional correlation id, ≤ 100 chars |
Request
bash
curl -X POST http://localhost:3000/api/v1/logs \
-H "Authorization: Bearer mng_your_logs_key" \
-H "Content-Type: application/json" \
-d '{"level":"info","name":"player.join","message":"Vextro joined","metadata":{"slot":12},"traceId":"sess-1"}'Response
json
{ "count": 1 }Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 403 | Key is not a logs key |
| 400 | Invalid JSON or payload (e.g. missing name, > 100 entries) |