Uses Get availability:
POST /api/availability with Authorization: Bearer $LUNACAL_API_KEY and a JSON body. API key setup.usernameList only finds that person’s own event types. Team events need a different request. Pick the one that matches how the event is set up:
Team events
Send the team event’sid. List event types returns team events inside each team’s group.
cURL
usernameList, the event slug in eventTypeSlug, and "isTeamEvent": true. Both slugs are in the team booking link: app.lunacal.ai/team/<team-slug>/<event-slug>.
Managed Events
A Managed Event is a team template, and each assigned host gets their own copy. The template has no hosts, so itsid always returns empty slots.
Check each host’s copy instead. Send the host’s username and the event slug, both taken from the host’s booking link: app.lunacal.ai/<username>/<event-slug>. Make one call per host.
cURL
Find the next open slot
Slots are grouped by date:- The first
timeunder the earliest date is the next open slot. - Date keys use the
timeZoneyou send. Everytimeis in UTC. - An empty
slotsobject means nothing is open in that range.