Skip to main content
The Luma class is the entry point for the unofficial SDK. Pass your API key once, then call typed methods on resource properties.

Quick start

import { Luma } from "@alhwyn/luma";

const luma = new Luma(process.env.LUMA_API_KEY!);

const user = await luma.users.get();
const { data: events } = await luma.events.list({ pagination_limit: 10 });
If you have not verified your API key yet, start with Test your setup.

Constructor

SDK new Luma(apiKey, options?): Luma Creates a Luma client for calling the API.
import { Luma } from "@alhwyn/luma";

const luma = new Luma(process.env.LUMA_API_KEY!, {
  baseUrl: "https://public-api.luma.com",
  fetch: customFetch,
});
// Returns a Luma client with luma.users, luma.calendar,
// luma.events, and luma.webhooks resource properties.
const luma: Luma;

Parameters

apiKey
string
required
Your Luma API key. Sent as the x-luma-api-key header on every request.
options
ClientOptions
Optional client configuration.

Resources

The client groups methods by resource:
PropertyMethodsGuide
luma.usersget()Users
luma.calendarget(), update()Calendar
luma.eventsget(), list(), create(), update()Events
luma.events.guestslist(), get(), add(), sendInvites(), updateStatus()Events
luma.events.ticketTypeslist(), get(), create(), update(), delete()Events
luma.webhookscreate(), get(), list(), update(), delete(), client()Webhooks

List responses

List methods return a normalized paginated shape:
interface ListResponse<T> {
  data: T[];
  hasMore: boolean;
  nextCursor: string | null;
}
const page = await luma.events.list({ pagination_limit: 20 });

page.data;        // items for this page
page.hasMore;     // more pages available?
page.nextCursor;  // pass as pagination_cursor for the next page
See Events — pagination for fetching the next page.

TypeScript types

Entity and param types are exported from the package:
import type {
  User,
  Calendar,
  Event,
  Guest,
  Webhook,
  WebhookEvent,
  ClientOptions,
  ListResponse,
} from "@alhwyn/luma";
For field-level details on request bodies, see the official Luma API docs.