Build a flow

Eventlayer / Build a flow

React to ticket changes

Verify an Eventlayer webhook and use its event data.

Run your own code when a ticket is assigned or checked in.

1. Create an endpoint

In Dashboard → Webhooks, add your server’s HTTPS endpoint and choose the events you need. Save the signing secret as EVENTLAYER_WEBHOOK_SECRET.

2. Verify the request

Inside your request handler, pass the raw body and headers to the SDK.

Webhook handler · server
import { verifyWebhook } from "eventlayer";

const event = await verifyWebhook({
  body: await request.text(),
  headers: request.headers,
  secret: process.env.EVENTLAYER_WEBHOOK_SECRET!,
});

if (event.event_type === "ticket.checked_in") {
  console.log(event.data.id, event.data.checked_in_at);
}

Verification throws for invalid requests. Do not process those payloads.

3. Handle the event

Save the verified event before returning a successful response. Use event.id to deduplicate retries and replays, then process your email, CRM or analytics work.

For delivery history, signing and retries, see the webhook reference.

Next steps

Send ticket emails or sync attendees to your CRM.