Browse docs
On this page

Direct HTTP POST

Send logs with one curl command - structured JSON, a batch, or plain text.

For CI jobs, one-off scripts, or services not worth instrumenting, this door accepts a plain HTTP POST. No SDK, no agent, no OpenTelemetry knowledge:

Shell
curl https://ingest.obistack.com/v1/events \
  -H "Authorization: Bearer $LOGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"level":"info","message":"hello from obistack","service":"my-script"}'
JSON
{ "accepted": 1, "sourceId": "28b335a4-d235-402f-9718-5816071a1087" }

A successful call returns 202 Accepted. That is deliberate: your events are durably queued at that point, not yet searchable. They become queryable a moment later, once the pipeline has run. accepted is the number of events we cut your body into - worth checking the first time you send a batch or a file, because it is how you find out you sent one event containing 500 lines instead of 500 events.

Getting a key

This endpoint takes an ingest key, which is not the same thing as a personal access token. Create one from Ingest API in Connect Your Data: name what is sending the logs, and you get a key with the command already filled in.

The key is shown once. We store only a hash of it, so it cannot be shown again or regenerated - if you lose it, revoke that source and connect a new one.

An ingest key can only send logs. It cannot read a single event back, which is what makes it safe to put in a CI secret: a leaked ingest key can add noise to your workspace, but it cannot get your data out of it.

The key is the source

Everything sent with a given key is filed under that key as its data source. You did not have to name a source in the request above, and you cannot: the key decides where its data lands, and nothing in the payload can override it.

That means the source shows up in your Sources list on the same footing as a Liveness Check, with its own retention setting and its own place in search - and revoking the key stops exactly that one source rather than anything else.

Body shapes

One event

Every field is optional.

FieldRequiredDefault
messagenoempty
levelnoempty
servicenoempty
timestampnowhen we received it
fieldsnonone

Nothing is defaulted to a placeholder value. An omitted level doesn't become info, and an omitted service doesn't become unknown - both just come back empty, so the Explorer shows nothing for that column rather than a fictional value that never appeared in your data. A message you do send has to say something: an explicit empty string or one that's all whitespace is rejected rather than stored as a blank row. Omitting it entirely is fine.

timestamp accepts an ISO-8601 string or a number of seconds, milliseconds, or nanoseconds since the epoch. A timestamp far in the past or more than an hour in the future is replaced with the receipt time - a container with no clock sync should not create a partition that never expires.

Anything you put in fields is kept as structured data, queryable by key:

Shell
curl https://ingest.obistack.com/v1/events \
  -H "Authorization: Bearer $LOGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timestamp": "2026-08-06T10:15:30.000Z",
    "level": "error",
    "message": "payment webhook retry exhausted",
    "service": "payments-worker",
    "fields": { "order_id": "ord_123", "attempt": 3 }
  }'

A batch

Send a top-level array. There is no wrapper object to learn - an array is the plural of an event, so one becomes many by putting brackets round it:

Shell
curl https://ingest.obistack.com/v1/events \
  -H "Authorization: Bearer $LOGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"level":"info","message":"checkout started","service":"checkout","fields":{"order_id":"ord_123"}},
    {"level":"warn","message":"payment retry","service":"payment","fields":{"attempt":2}},
    {"level":"error","message":"payment failed after 3 attempts","service":"payment"}
  ]'
JSON
{ "accepted": 3, "sourceId": "28b335a4-d235-402f-9718-5816071a1087" }

Batch whatever you can. Rate limits are per key and counted in requests, not events (600 a minute by default), so a loop that posts once per line hits 429 on traffic a single batched request would not notice. The ceiling per request is 5,000 events or 5 MB, whichever comes first; past either you get a 400 naming the count, or a 413.

Plain text

Structured JSON is not a precondition. Send text/plain and every line becomes an event, landing in message byte for byte - including stack traces, ANSI escapes, and whatever an appliance felt like emitting. There is no schema to satisfy and nothing to escape:

Shell
curl https://ingest.obistack.com/v1/events \
  -H "Authorization: Bearer $LOGS_API_KEY" \
  -H "Content-Type: text/plain" \
  --data-binary '2026-08-06T10:15:30Z INFO  checkout  cart loaded in 42ms
2026-08-06T10:15:31Z WARN  payment   gateway slow (1.2s)
2026-08-06T10:15:33Z ERROR payment   gateway timeout after 3 retries'

Blank lines are skipped rather than stored as empty events, and both \n and \r\n split. Which means it composes with the tools you already have:

Shell
tail -n 100 /var/log/app.log \
  | curl https://ingest.obistack.com/v1/events \
      -H "Authorization: Bearer $LOGS_API_KEY" \
      -H "Content-Type: text/plain" \
      --data-binary @-

Use --data-binary, not -d, whenever the newlines matter. curl -d @file strips them, which silently collapses an entire log file into one enormous event - accepted: 1 where you expected accepted: 100. Inline -d keeps them, but --data-binary is right in both cases, so it is the habit worth having.

NDJSON goes through this same door: each line is its own JSON object, and the pipeline parses it as one rather than storing the braces as text.

Shell
curl https://ingest.obistack.com/v1/events \
  -H "Authorization: Bearer $LOGS_API_KEY" \
  -H "Content-Type: text/plain" \
  --data-binary '{"level":"info","message":"one","service":"batch-job"}
{"level":"error","message":"two","service":"batch-job"}'

Errors

An error names the field that is wrong, and for a batch, which element it was in - never a bare status with no body:

Shell
curl https://ingest.obistack.com/v1/events \
  -H "Authorization: Bearer $LOGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"message":"fine"},{"message":"   ","service":"nope"}]'
JSON
{
  "error": "invalid_event",
  "message": "Event at index 1: \"message\" must be a non-empty string.",
  "field": "message",
  "index": 1
}

A batch is validated as a unit: nothing is stored if any element is rejected, so a fixed payload can be retried whole without double-sending the events that were already fine.

StatusMeaning
400The payload is malformed. The response names the offending field, and the element's index when you sent a batch.
401No credential, or one we do not recognise.
403A valid key, but not an ingest key - most often a personal access token.
413The body is over the size cap. Split it.
429This key is sending too fast. See retry-after; rate limits are per key, so splitting traffic across several keys raises the ceiling.

One failure that is not ours: bare curl -d with no Content-Type header sends application/x-www-form-urlencoded, and the request is refused on the media type before the handler ever sees the body. Always set the header.

Confirming it worked

The Connect Your Data panel waits for your first event and shows it as soon as it lands, with a link into the Log Explorer filtered to that source. You can also watch it arrive live in Live Tail.

Every operation on this endpoint - request shapes, status codes, and a panel that runs a real request against your own workspace - is in the API reference.

Tenant Isolation & Data Boundaries

The workspace an event lands in comes from the API key and nothing else. There is no workspace or tenant parameter on this route, and a top-level tenant_id in the payload is dropped, and the attempt logged, rather than honoured - the body is not read at all until after the event's tenant has been fixed from the credential, so a payload cannot influence its own routing.

A tenant_id inside fields is left alone. That is ordinary customer data - a multi-tenant application of your own, logging its own tenant id - and it can only ever land in the fields map, never in the column that scopes the row. See Tenant Isolation for the full model.