Eventlayer / Understand the model
Attendees
Register and manage people for your events.
Attendees represent people registered for an event. Each attendee is scoped to a single event and can be assigned one or more tickets.
Why attendees?
Attendees let you separate who is coming from what kind of access they have. By modeling people independently from tickets, you can assign multiple ticket types to the same person (e.g. a conference pass and a workshop add-on), track their check-in status, and manage registrations without coupling them to ticket inventory.
How attendees work
Every attendee has a name, email address, and a status (defaulting to confirmed). Attendees are always created under a specific event — there is no global attendee pool.
When you delete an attendee, any tickets assigned to them are unassigned (not deleted), so you can reassign them to another person if needed.
Add a test attendee from the event page in the dashboard while validating your setup. In production, create attendees through the SDK or API when someone registers in your application.
Attendees support cursor-based pagination for efficient listing:
// Paginate forward
const { data: page, error: pageError } = await eventlayer.attendees.list({
eventId: "ev_123",
limit: 20,
after: "atd_last_id",
});
if (pageError) throw pageError;
const { items, meta } = page;Working with attendees
// Create an attendee under an event
const { data: attendee, error: attendeeError } = await eventlayer.attendees.create({
eventId: "ev_123",
name: "Maya Chen",
email: "maya@example.com",
});
if (attendeeError) throw attendeeError;
// List attendees for an event
const { data: page, error: pageError } = await eventlayer.attendees.list({
eventId: "ev_123",
});
if (pageError) throw pageError;
const { items } = page;
// Auto-paginate through all attendees
for await (const { data: a, error } of eventlayer.attendees.listAll({
eventId: "ev_123",
})) {
if (error) throw error;
console.log(a.name);
}See the Attendees API Reference for full request and response schemas.
Create an attendee with a ticket
Pass createTicket to create and assign a ticket in the same request:
const { data, error } = await eventlayer.attendees.create({
eventId: "ev_123",
name: "Maya Chen",
email: "maya@example.com",
createTicket: { ticketTypeId: "tt_123" },
});
if (data) {
console.log(data.id, data.ticket?.id);
}Use createTicket: true when the event has exactly one ticket type. If it has
multiple types, supply createTicket: { ticketTypeId: "tt_123" }. If it has no
ticket types, create one before requesting a ticket.
Omitting createTicket or setting it to false creates only the attendee. The response includes ticket
only when requested, with its status set to assigned.
Creation is atomic: if ticket creation fails, neither record is saved. Successful
creation emits both attendee.created and ticket.created webhooks.