E EMBAN / Docs

Events

Events are the core data unit in Emban. Each event represents something that happened in your application — an API call, a document processed, a user action.

Do not confuse two layers: this page describes product data events you ingest into Emban. Browser/embed runtime events such as ready, filter, period-change, and drill are documented in Embed Runtime, plus the React guide and Next.js guide.

Event schema

FieldTypeRequiredDescription
tenant_idstringYesYour customer's identifier
event_namestringYesWhat happened: api.call, document.processed
timestampISO 8601NoWhen it happened. If omitted, Emban uses the current server time.
event_idstringNoDeduplication key (auto-generated if empty)
user_idstringNoEnd-user who triggered the event
string_propsobjectNoString dimensions: {"model": "gpt-4"}
numeric_propsobjectNoNumeric measures: {"tokens": 150}

Sending events

POST /v1/events
Authorization: Bearer YOUR_INGEST_API_KEY
Content-Type: application/json

{
  "events": [
    {
      "tenant_id": "customer_1",
      "event_name": "api.call",
      "timestamp": "2026-03-29T12:00:00Z",
      "user_id": "user_42",
      "string_props": {"model": "gpt-4", "endpoint": "/chat"},
      "numeric_props": {"tokens": 150, "latency_ms": 230}
    }
  ]
}

/v1/events accepts ingest or admin keys. In production, prefer a dedicated ingest key. If you omit timestamp, Emban stamps the event at ingest time.

You can send up to 1000 events per request. Events are written to ClickHouse and available for queries within seconds.

Naming conventions

Modeling patterns

Most event schemas get stronger when you keep a few stable patterns instead of inventing a new shape for each feature.

Pattern 1 One action, one event Prefer clear action names such as api.call or document.processed over broad catch-all events like activity. Cleaner names turn into cleaner widgets later.
Pattern 2 Stable dimensions, not prose Keep string_props tight and enumerable, such as model, endpoint, status, or plan. Free-form labels make filters noisy and hard to reason about.
Pattern 3 Measures stay numeric Put values such as tokens, latency_ms, cost_usd, and pages in numeric_props. Do not encode numbers as strings if you expect charts, totals, or thresholds.
Pattern 4 Tenant first, always Treat tenant_id as required product structure, not optional metadata. The whole published embed and permission model assumes every event is already customer-scoped.
Pattern 5 Schema before volume It is safer to stabilize names and properties early than to ingest a large volume of loosely shaped events. Dashboards, drill paths, and locked filters all depend on that schema staying coherent.

Sample payloads

AI/LLM usage

{
  "tenant_id": "acme_corp",
  "event_name": "api.call",
  "timestamp": "2026-03-29T14:30:00Z",
  "user_id": "user_42",
  "string_props": {"model": "gpt-4", "endpoint": "/chat", "status": "success"},
  "numeric_props": {"tokens": 1250, "latency_ms": 890, "cost_usd": 0.045}
}

Document processing

{
  "tenant_id": "acme_corp",
  "event_name": "document.processed",
  "timestamp": "2026-03-29T14:30:00Z",
  "string_props": {"type": "pdf", "status": "completed"},
  "numeric_props": {"pages": 42, "processing_ms": 3200}
}

Customer activity

{
  "tenant_id": "acme_corp",
  "event_name": "feature.used",
  "timestamp": "2026-03-29T14:30:00Z",
  "user_id": "user_42",
  "string_props": {"feature": "export", "plan": "pro"}
}
Validation path: once your event model is stable, move next to Dashboards to shape the published surface, then to Permissions if the customer-facing view needs locked filters, hidden widgets, or bounded drill paths.