Sending events
One endpoint. Authenticate with your API key as a bearer token.
POST https://api.simpletelemetry.io/v1/events
Authorization: Bearer st_your_api_key
The body is a single event, an array of events, or {"events":[…]}.
All three work. Requests can be up to 1 MB.
{"events":[
{"event":"http_request","route":"/api/users","ms":42,"ok":true},
{"event":"http_request","route":"/api/login","ms":180,"ok":false}
]}
The shape of an event
event names the table. Every other field becomes a column.
Events with different fields union-merge: missing fields are just null.
| Rule | Detail |
|---|---|
| Names | event and field names: a-z 0-9 _ -, max 64 chars. event and time are reserved. |
| Values | numbers, strings and booleans. Nested objects, arrays and nulls reject the event. |
| Numbers | stored with 2 decimal places; extra precision is rounded. |
| Types | fixed the first time a field is seen. A field that was a number can't later be a string; those events are rejected. |
| Fields | up to 128 columns per table (including time), up to 1024 tables. |
Time
The server stamps time (epoch seconds) when the event arrives. Clients never
send timestamps, so clock skew can't exist. Events are queryable within a couple of seconds
of the 202.
Responses
| Status | Meaning |
|---|---|
202 | accepted. The body is {"accepted":N,"rejected":N,"error":"…"}. Batches are per-event: valid events land even when others in the batch are rejected; error holds the first rejection reason. |
400 | every event in the request was rejected, or the body wasn't valid JSON. |
401 | missing or invalid API key. |
402 | trial or subscription ended, or the plan's event limit is reached. |
413 | body over 1 MB. Split the batch. |
There's no dedup: if you retry a request that actually landed, the events count twice. Batch on your side (one request a second is plenty) rather than one request per event.
Retention and limits
Events are kept for 30 days, then expire automatically. Your plan's event limit applies to events currently stored, the rolling 30-day window, so it isn't a counter that resets monthly: as old events expire, room frees up on its own, and upgrading lifts the cap instantly. Usage per table is on your account page.