Scheduling a gathering
This guide builds two common coordination flows with gatherings: a scheduled appointment that emails calendar invites and auto-starts a transcribed session, and a matchmaking lobby with ready-up.
Scheduled appointment
Create an appointment, invite people (they receive an email with an .ics calendar
attachment), and let Cortex start the session automatically at the scheduled time.
When startsAt arrives, the session starts and the bot joins — you’ll receive
gathering.started and session.created events. When
endsAt passes (or you call appointment.end()), the gathering ends and its session is
stopped with it, so the bot leaves the room; the session’s endedAt records when. To email a
recap when it ends, see Email a meeting summary.
Matchmaking lobby
A lobby gathers players, waits for everyone to mark ready, then starts.
Join by code
Share a gathering’s join code (lobby.joinCode) so people can join without an explicit
invitation. Codes are case-insensitive and hyphen-tolerant, and they only resolve inside their
own project. Resolve them in your backend — the lookup and join calls need an API key with the
gatherings scope:
An unknown code — or one from another project — fails with a 404
(CortexNotFoundError in the SDK).
React with events or functions
Every step emits events — gathering.member.joined, gathering.member.ready,
gathering.invitation.accepted, gathering.started, gathering.ended. Subscribe over
webhooks or handle them in a
function: