Skip to main content
An event is something that happened in your app, with a type and a payload:
Relay answers 202 Accepted once the event is stored. Delivery happens after that, so the response doesn’t wait for your endpoints.

Endpoints and subscriptions

An endpoint is a URL that receives webhooks. Each endpoint subscribes to the event types it wants. When you send an event, Relay creates one delivery for each endpoint whose subscriptions match, and tracks and retries each delivery on its own.
Diagram of one invoice.paid event sent to Relay and delivered to the billing service, subscribed to invoice.*, and the analytics pipeline, subscribed to all events, but not to the Slack alerts endpoint, subscribed only to customer.created.

One invoice.paid event becomes two deliveries: billing and analytics subscribed to it, Slack alerts did not.

Event types

Name types resource.action in lowercase, such as invoice.paid or customer.created. Relay doesn’t need you to register types first; the dashboard lists every type it has seen.

Payloads

data is any JSON object up to 256 KB, and Relay delivers it unchanged inside this envelope:
Keep payloads small and stable. Send ids and the fields a receiver needs to act; a receiver that needs more can fetch it from your API. Add fields freely, but don’t rename or remove them: endpoints you don’t control may depend on them.

Batches

Send up to 100 events in one request with POST /v1/events/batch. Each event in a batch can have its own idempotency_key. See Rate limits.