Eventlayer / Eventlayer API
An event API you’ll
actually want to integrate.
Predictable REST resources, a typed TypeScript SDK, useful errors and the context you need when something goes wrong.
Show the API
From API key to first ticket.
Install eventlayer and set EVENTLAYER_KEY on your server. This excerpt creates an event and an available ticket. The quickstart adds Maya as an attendee and assigns her ticket, with recovery guidance for each step.
Read the quickstartTypeScript · server-side excerpt
// npm install eventlayer
import { Eventlayer } from "eventlayer";
// Reads EVENTLAYER_KEY from your server environment.
const eventlayer = new Eventlayer(undefined, { maxRetries: 0 });
const { data: event, error } = await eventlayer.events.create({
name: "After Hours",
startAt: { utc: "2026-11-07T08:00:00Z", timezone: "Australia/Sydney" },
});
if (error) throw error;
const { data: ticket, error: ticketError } =
await eventlayer.tickets.create({ eventId: event.id });
if (ticketError) throw ticketError;
console.log(ticket.id);The Eventlayer model
Resources that fit together.
An event groups its attendees and ticket types. Each ticket belongs to a type and can be assigned to one attendee. Wallet and check-in use that ticket.
Event / After Hours
Time, location and the people coming.
Ticket types
General Admission, VIP, Staff
↓ each ticket belongs to a type
Ticket
Available → assigned → checked in
Attendees
Maya Chen and the people registered
↓ assign an attendee to a ticket
Ticket ↔ Attendee
One ticket records access. One attendee can hold multiple tickets.
Useful failure context
Errors made for code, not screenshots.
Branch on a stable code and field name. Keep the request ID when a failure needs investigation.
422 · response excerpt
{
"status": 422,
"error": {
"code": "VALIDATION_FAILED",
"detail": "One or more fields are invalid.",
"requestId": "req_01k2example",
"fields": [{
"field": "endsAt",
"message": "The end time must be after the start time."
}]
}
}HTTP failures come back in the SDK’s error result. Network failures throw, so you can distinguish a rejected request from an unknown outcome.
REST API
Not using TypeScript? It’s still just HTTP.
TypeScript · server
const { data, error } = await eventlayer.events.list();
if (error) throw error;
console.log(data);cURL · server
curl https://api.eventlayer.dev/v1/event \
-H "Authorization: Bearer $EVENTLAYER_KEY"Your product. Eventlayer underneath.
Make your first API call.
Create a workspace, verify your email and issue your first ticket with the quickstart.
Start buildingFree during private beta. No credit card.