Skip to main content
POST
POST /v1/logs is the single ingestion endpoint for the Peeng API — it accepts a batch of 1 to 500 structured log entries in one request and is the same endpoint every Peeng SDK method calls under the hood. You can use it directly with any HTTP client if you prefer to stay dependency-free.

Headers

string
required
Your project’s API key. See Authentication for how to obtain and manage keys.
string
A key unique to this batch. Safe to reuse on retries for up to 24 hours — Peeng returns the original response without writing duplicate entries. See Idempotency.
string
required
Must be application/json.

Request Body

array
required
An array of 1 to 500 log entry objects. Every entry in the array is validated; if any entry fails validation the entire request is rejected with a 400 and nothing is written.

Response Fields

A 202 response body contains a single field confirming how many entries were written.
integer
The number of log entries persisted from this request. A 202 response with accepted equal to the length of the logs array confirms that every entry in the batch was written successfully. There is no partial-success shape — a request either succeeds entirely or fails validation entirely, so accepted will always match the number of entries you submitted on a 202.

Response Codes

See Errors for the full response envelope shape and retry guidance.