Quickstart
Four steps, roughly five minutes. You will need a project token, which you can mint from the console under Settings → API tokens.
1. Export your token
export MERIDIAN_TOKEN="mk_live_8f3c…"
Tokens are scoped to a single project and a single region. A token issued for us-east will be rejected by ingest-eu-central with a 403 region_mismatch.
2. Verify connectivity
curl -sS -o /dev/null -w '%{http_code}\n' \
-H "Authorization: Bearer $MERIDIAN_TOKEN" \
https://ingest-us-east.meridian.example/v1/health
# 204
3. Send a batch
Write two events to a file and post it as application/x-ndjson:
cat > batch.ndjson <<'JSON'
{"ts":"2026-11-25T09:14:02Z","service":"checkout","event":"order.created","props":{"cart_value":42.9}}
{"ts":"2026-11-25T09:14:03Z","service":"checkout","event":"order.paid","props":{"cart_value":42.9}}
JSON
curl -sS -X POST https://ingest-us-east.meridian.example/v1/events \
-H "Authorization: Bearer $MERIDIAN_TOKEN" \
-H "Content-Type: application/x-ndjson" \
--data-binary @batch.ndjson
A successful call returns 202 with a batch receipt:
{
"batch_id": "bt_01JGY4K2Q7",
"accepted": 2,
"rejected": 0,
"received_at": "2026-11-25T09:14:07.412Z"
}
4. Read it back
curl -sS -G https://api.meridian.example/v1/query \
-H "Authorization: Bearer $MERIDIAN_TOKEN" \
--data-urlencode 'q=select count() from events where event = "order.paid"'
Indexes are built asynchronously. Expect new events to appear in query results within 2–5 seconds; the
lag_seconds field in the health response reports the current ingest-to-query delay.Troubleshooting
| Symptom | Likely cause |
|---|---|
401 invalid_token | Token revoked, or trailing whitespace in the header value. |
413 batch_too_large | Batch exceeds 5 MB. Split it and reuse the same Idempotency-Key per batch. |
422 schema_mismatch | An event has a field whose type contradicts the project schema. Check errors[].index. |