Skip to content

Ingest logs

Terminal window
curl -X POST https://api.spawnbase.gg/api/v1/logs \
-H "Authorization: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '[{"level":"error","message":"payment failed","resource":"shop","metadata":{"playerSource":12}}]'
  • Body: a JSON array, 1–1000 entries, ≤1 MB. A single object is accepted and wrapped.
  • Entry: message (required, ≤16 KB; stored and returned as body), level, resource (default default, ≤128 chars), metadata (≤32 KB serialized). traceId/parentId are yours to set; the server generates a traceId when absent.
  • One bad entry rejects the whole batch: 400 bad_entry with the failing index. Fix and resend — nothing was stored.
  • Over quota: 429 quota_exceeded. Nothing is silently dropped.
  • Response: { "status": "ok" }.