---
title: "Bulk ingest logs (Elasticsearch compatible)"
method: POST
path: "/api/{org_id}/_bulk"
tags: ["Logs"]
---

# Bulk ingest logs (Elasticsearch compatible)

`POST /api/{org_id}/_bulk`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/_bulk`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/_bulk/post.ts> (a function with typed inputs; its response is checked against the schema)

Ingests multiple log records in bulk using Elasticsearch-compatible NDJSON format. Each line contains either an index/create action followed by the document data. This endpoint provides high-throughput ingestion for applications migrating from or integrating with Elasticsearch.

## Path parameters

- `org_id` string, required

## Request body

- string

## Response `200`

Success

- BulkResponse
  - `errors` boolean, required
  - `items` object[], required
  - `took` integer, required

## Other responses

- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
