curl & raw HTTP
Plain HTTP — no SDK required.
You don't need an SDK. Every Millimetric endpoint is a plain HTTPS call with a Bearer token. Useful for shell scripts, GitHub Actions, cron jobs, server backfills, or anything we don't ship a library for yet.
Auth
Authorization: Bearer {key}
Content-Type: application/jsonFor pk_* keys, also include Origin: matching the project's allowlist (pk_* from servers will fail without it).
Ingest one event
curl -X POST https://api.millimetric.ai/v1/track \
-H "Authorization: Bearer $SK_KEY" \
-H "Content-Type: application/json" \
-d '{
"event": "signup",
"anonymous_id": "u_abc",
"user_id": "user_42",
"properties": { "plan": "free" }
}'Expected: 202 {"ok":true,"event_id":null}.
Ingest a batch
Identify
Forget a user
Query — top sources this month
Query — daily signups by source
Browser-side (pk_*) — needs Origin
If Origin is missing or not allowlisted you'll get:
Tips
Pipe to
jq:curl … | jqfor legible JSON.Save keys to a .env file:
export SK_KEY=sk_live_…and source it once per shell.Use a fish/zsh function for repeated queries — the URL-encoded query params can get long.
Logs from the Worker: when something goes wrong,
wrangler tail(orpnpm dev:apilocally) shows the full traceback. The HTTP response only ever returns a shorterrorcode.
Last updated
Was this helpful?