---
title: "Ingest events"
method: POST
path: "/ingest"
tags: ["Ingest"]
---

# Ingest events

`POST /ingest`

Primary structured ingest endpoint. Accepts only a top-level JSON array of event-envelope objects.

- Each item must contain `event` plus optional `time`, `source`, `sourcetype`, `host`, `index`, and `fields`.
- Use `/ingest/raw` for newline-delimited text or NDJSON.
- Use `/es/_bulk` for Elasticsearch bulk payloads.

## Request body

- StructuredIngestEvent[]
  - `event` string, required — Raw event text stored in `_raw`
  - `time` number — Unix timestamp in seconds
  - `source` string
  - `sourcetype` string
  - `host` string
  - `index` string
  - `fields` object — Additional scalar fields copied onto the event

## Response `200`

All events accepted

- IngestResponse
  - `data` object, required
    - `accepted` integer, required
    - `failed` integer, required

## Other responses

- `207` — Partial failure — some events accepted, some rejected
- `401` — Authentication required
- `413` — Event or batch exceeds size limit
- `429` — Too many requests

---

[API](https://skmtc.net/lynxbase/apis/lynxdb-api.md) · [All operations](https://skmtc.net/lynxbase/apis/lynxdb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lynxbase/lynxdb-api/revisions/4363a070c444/schema)
