Concepts

Events

The shape of a Kestrel event, how types are named, and what ordering guarantees you get.

Events

An event is an immutable record that something happened. Kestrel stores it, fans it out to your subscriptions, and keeps the delivery history for your plan's retention window.

Anatomy

{
  "id": "evt_01HZX9K2QW",
  "type": "invoice.paid",
  "streamKey": "customer_9f2a",
  "createdAt": "2026-08-24T09:14:22.481Z",
  "apiVersion": "2026-06-01",
  "payload": {
    "invoiceId": "in_1024",
    "amountCents": 4900,
    "currency": "usd"
  }
}
FieldTypeNotes
idstringPrefixed evt_, 26 characters, lexicographically sortable by time.
typestringLowercase, dot-separated, max 3 segments.
streamKeystringOptional. Events sharing a key are delivered in order.
createdAtstringRFC 3339, millisecond precision, always UTC.
apiVersionstringThe version pinned on the key that published the event.
payloadobjectYour data. Must be a JSON object, not an array or scalar.

Naming types

Event types are lowercase and dot-separated, with at most three segments — invoice.paid, user.subscription.cancelled. Kestrel rejects a type with four or more segments with 422 invalid_event_type.

Type names are case-sensitive on the wire but subscriptions match case-insensitively, so a subscription to Invoice.Paid receives invoice.paid.

Ordering

Events that carry the same streamKey are delivered to a given endpoint in the order they were published. Events with different keys, or with no key at all, have no ordering guarantee relative to each other.

Ordering is per endpoint, not global. If one endpoint is retrying an event, later events on the same stream key queue behind it for that endpoint only — other endpoints keep receiving normally.

Size

A single event payload may be up to 256 KB once serialized. Larger payloads are rejected with 413 payload_too_large. Store the body elsewhere and send a reference if you need to move more than that.

Retention

PlanEvent retentionDelivery log retention
Free7 days7 days
Team60 days60 days
Enterprise90 days90 days

Retention is enforced by a nightly job that runs at 03:00 UTC. See Limits and quotas for the full table.