---
title: "Ingest newline-delimited JSON log lines with a log ingest key."
method: POST
path: "/logs/ingest"
tags: ["Logs"]
---

# Ingest newline-delimited JSON log lines with a log ingest key.

`POST /logs/ingest`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/logs/ingest`
- Auth: HTTP bearer

One JSON object per line; see the logs documentation for the keys read.
A batch is parsed and charged to the budget whole before anything is
stored, so a malformed or over-budget batch stores nothing. Storage is
at least once: if storing fails part-way (a full disk), the lines before
the failure are kept and counted against the key, the request fails, and
a collector that resends the batch stores those lines again.

## Request body `application/x-ndjson`

- string

## Response `202`

Lines stored

- LogIngestResponse
  - `accepted` integer, required: Lines stored from this request.

## Other responses

- `400`: A line is not a JSON object
- `401`: Missing or unknown key
- `408`: The body did not arrive in time
- `413`: Body too large
- `415`: Compressed body
- `429`: The project's log ingestion budget is exhausted
- `500`: Internal server error
- `503`: Too many ingest requests in flight; retry after the Retry-After delay

## Changes

- **2026-11-21** `d57a37c13a27`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/logs/ingest/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
