All systems operational--:--:-- UTC

Events

The event envelope, registering event types, the ingest API and its limits.

On this page

Events are the shared record of everything that happens in a workspace. Every module writes them, and you can send your own. Analytics queries them all together.

The envelope

{
  "id": "evt_01J9ZK4R7W2Q",
  "type": "telemetry.threshold_breached",
  "module": "robotics",
  "entity": "unit/AMR-0398",
  "actor": "system/edge-agent",
  "at": "2026-10-17T13:47:52.118Z",
  "data": { "channel": "drive.motor_temp_c", "value": 62.4, "limit": 60.0 },
  "links": ["site/rotterdam-dc2", "workorder/WO-3318"]
}
FieldRequiredNotes
typeYesLower case, dot-separated, such as checkout.completed
entityYeskind/id of what the event is about
actorYeskind/id of who or what caused it
atNoDefaults to receive time. Up to 7 days in the past
dataNoTyped per event type
linksNoOther related entities, up to 16
idNoGenerated if omitted. Supply one to make sends idempotent

Register an event type

Registering a type gives you validation at ingest, autocomplete in the query editor and PII tagging.

await cl.events.types.register({
  type: 'checkout.completed',
  schema: {
    amount: { type: 'decimal' },
    currency: { type: 'string', length: 3 },
    email: { type: 'string', pii: true },
  },
});

Unregistered types are accepted and stored, but their data is kept as JSON and is slower to query.

Send in batches

curl https://api.consciouslab.xyz/v1/events/batch \
  -H "Authorization: Bearer $CL_API_KEY" \
  -H "Content-Type: application/x-ndjson" \
  --data-binary @events.ndjson

Batches accept up to 1,000 events or 5 MB. The response lists any events that failed validation by line number; valid events in the same batch are stored.

Limits

PlanSustainedBurst
Starter1,000 events/s5,000 events/s
Pro50,000 events/s250,000 events/s
EnterpriseCustomCustom

PII and deletion

Fields tagged pii: true are encrypted with a per-workspace key and masked in the query editor for roles without analytics:pii. Deleting an entity with DELETE /v1/entities/{entity} removes its PII fields from all events within 30 days.