Skip to main content
Every relevant change produces an event: an immutable fact about a resource. Webhooks, the dashboard and usage metering all read from this same log. You consume events in two ways:
  • Webhooks: Routa sends each event to your HTTPS endpoint. See Webhooks.
  • Querying: GET /v1/events lists events and is the reconciliation path if you missed deliveries.

The event object

Because data carries the full resource, a consumer that processes only the latest event of each resource converges on the correct state.

Event types

See the details of each type in Event types.
New event types can appear at any time. That is why each webhook endpoint subscribes to an explicit list of types (message.delivered, for example) or to a per-resource wildcard (message.*). Ignore types your code does not recognize.

Delivery semantics

Delivery is at least once, with no global ordering guarantee. Your consumer needs to:
1

Deduplicate by id

Store the id of the events you already processed (a set with a 24-hour TTL is usually enough) and ignore repeats.
2

Ignore the unknown

Ignore event types and fields you do not recognize.
3

Treat the status as monotonic

Never downgrade a message from read to sent just because an older event arrived later. Compare the status or use occurred_at.
The official SDK already helps with this: events of unknown types are parsed as a generic event instead of raising an error. See Webhooks in the SDK.

Query missed events

If your server was down, you do not need to ask support for a replay. List the events from the last one you processed:
The cursor is the event ID itself (after). The response carries has_more and next_cursor. See GET /v1/events and Reconcile events.

Retention

Events are available for 90 days.