sendLogs
HTTP API
POST a JSON list of log lines from anything that can make an HTTP request — a script, a function, a log shipper you already run.
- 1Create an ingest key
Under Integrations & API → Main API keys, create a key with the Ingest only scope. It can send logs but read nothing, so it is the safe choice for a log shipper, and it is available on every plan.
- 2Send lines
curl -X POST https://api.zharp.io/api/v1/logs/ingest \ -H "X-API-KEY: $ZHARP_INGEST_KEY" \ -H "Content-Type: application/json" \ -d '[{ "timestamp": "2026-10-19T12:00:00Z", "service": "checkout", "env": "prod", "version": "1.4.2", "level": "error", "message": "Payment failed", "metadata": { "orderId": "A-1042" } }]' - 3Find them
Within seconds, the lines are on the Logs page under their service.
Fields
| Field | Required | Notes |
|---|---|---|
message | Yes | The line. |
service | No | The service it's filed under. Default unlabeled. |
timestamp | No | ISO 8601, or epoch seconds or milliseconds. Default: when it arrives. |
level | No | debug, info (default), warn, error, fatal — common spellings and syslog numbers map onto those. |
env / environment, version | No | Tags — see Tags & parsing. |
source | No | What wrote the line — nginx, postgresql, json… — which picks how it's parsed. |
metadata | No | Anything else to keep with it, searchable as @field. A stack here shows as a stack trace. |
Limits and answers
- Up to 10 MB a request, any number of lines. Send in batches rather than a request per line.
401: no key, or one that's invalid, disabled or expired.429: the workspace has sent its log allowance for the month — see Retention and allowance. Lines are accepted again on the 1st.- A sender that can't set headers can put the key in the path, and searching logs over the API uses a
readkey — both in the API reference.