ZevSight
Open app

Send data

HTTP ingest API

Send log events to ZevSight with one POST, as JSON or NDJSON, optionally gzip-compressed, with an ingest token.

POST https://ingest.zevsight.com/v1/ingest/events

Use this when there is no SDK for your language, or when you want full control. Full field reference: Ingest API reference.

Authenticate

Send an ingest token (zsi_…) as a bearer token. It is the only header form accepted.

Authorization: Bearer <INGEST_TOKEN>

Find or create tokens in the dashboard: Services → your service → Connect.

Send a batch

curl -X POST https://ingest.zevsight.com/v1/ingest/events \
  -H "Authorization: Bearer <INGEST_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: batch-2026-11-29-0001" \
  -d '{
    "events": [
      {
        "service": "checkout",
        "environment": "production",
        "type": "log",
        "severity": "error",
        "ts": "2026-11-29T09:41:07.512Z",
        "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
        "attrs": { "route": "/v1/pay", "user.id": "42" },
        "resource": { "host.name": "web-1" },
        "body": {
          "message": "payment provider timeout after 3 retries",
          "fields": { "provider": "card", "attempt": 3 }
        }
      }
    ]
  }'

Formats

Content-TypeBody
application/json{"events": [ … ]} with 1 to 5,000 events
application/x-ndjsonOne event object per line

Add Content-Encoding: gzip to send a compressed body. The size limit applies after decompression.

Event fields

FieldRequiredNotes
typeyeslog for log lines. heartbeat is also accepted; check_result is refused for ingest tokens.
bodyyesFor logs: {"message": "...", "fields": { ... }}. message is truncated above 64 KiB. fields holds structured data of any shape.
serviceSlug, default unknown (or the token’s service).
environmentSlug, default production (or the token’s environment).
severityA level name: trace, debug, info, warn, error, fatal. Common logger spellings also work: warning, err, critical, panic, notice, verbose and more. Send a string, not a number.
tsRFC 3339. If it is more than 10 minutes in the future or more than 7 days in the past, the receive time is used and the original is kept in attrs as zs.original_ts.
idUUIDv7. Omit it and one is generated. Send your own to make retries safe.
trace_id, span_id32 and 16 lowercase hex characters. Invalid values are moved aside, not rejected.
attrsFlat string map, searchable as attrs.<key>:value. Up to 128 keys.
resourceFlat string map describing the source (host, version, region). Searchable as resource.<key>:value.

Unknown top-level fields, and body keys other than message and fields, are dropped. Put structured data in fields and anything you want to filter on in attrs.

Responses

A 202 means the events were durably queued. They are searchable within seconds, and visible in live tail sooner.

{
  "accepted": 9,
  "rejected": [{ "index": 3, "field": "trace_id", "message": "..." }],
  "quota": { "used_ratio": 0.83, "state": "warning" }
}
  • rejected lists events refused one by one. The rest were stored.
  • quota appears once the workspace has used 80% of its monthly ingest.
StatusCodeWhat to do
400INVALID_REQUESTFix the request; every event in it was invalid.
401UNAUTHENTICATEDCheck the token, and that it is an ingest token.
413PAYLOAD_TOO_LARGESplit the batch: at most 5,000 events and 5 MiB decompressed.
421WRONG_REGIONSend to the host in the response’s endpoint field.
429RATE_LIMITED or QUOTA_EXCEEDEDWait for Retry-After seconds.
503UNAVAILABLENothing was stored. Retry after Retry-After.

Next

Built 29 November 2026 · View as Markdown