---
title: Team registration | Space Works Events docs
description: Documentation index. Team registration in the Space Works Events documentation: modules.
url: https://spaceworkslabs.tech/docs/events/teams/
updated: 2026-10-30
---

[Space Works Events](https://spaceworkslabs.tech/docs/events/) Overview
- [Overview](https://spaceworkslabs.tech/docs/events/overview/)
- [Features](https://spaceworkslabs.tech/docs/events/features/)
- [Event permissions matrix](https://spaceworkslabs.tech/docs/events/permissions/)
Modules
- [Paid tickets](https://spaceworkslabs.tech/docs/events/payments/)
- [Team registration](https://spaceworkslabs.tech/docs/events/teams/)
- [Applications and shortlisting](https://spaceworkslabs.tech/docs/events/admission/)
- [Hackathon submissions, judging, and results](https://spaceworkslabs.tech/docs/events/hackathon/)
- [Mentor Desk](https://spaceworkslabs.tech/docs/events/mentor-desk/)
- [Event crew](https://spaceworkslabs.tech/docs/events/crew/)
- [Volunteer shifts and contributor hours](https://spaceworkslabs.tech/docs/events/volunteers/)
- [Ticket designer](https://spaceworkslabs.tech/docs/events/ticket-designer/)
- [Attendance confirmation ("Are you still coming?")](https://spaceworkslabs.tech/docs/events/attendance/)
- [Event finance](https://spaceworkslabs.tech/docs/events/finance/)
Install and run
- [Host the complete stack on a VPS](https://spaceworkslabs.tech/docs/events/deployment-vps/)
- [Production Docker deployment](https://spaceworkslabs.tech/docs/events/deployment-docker/)
- [Free-tier cloud deployment](https://spaceworkslabs.tech/docs/events/deployment-cloud/)
- [Netlify frontend with a Docker VPS backend](https://spaceworkslabs.tech/docs/events/deployment-split/)
- [Configuration](https://spaceworkslabs.tech/docs/events/configuration/)
- [Production operations](https://spaceworkslabs.tech/docs/events/production-operations/)
Developers
- [Machine API v1](https://spaceworkslabs.tech/docs/events/api/)
- [Organisation webhooks](https://spaceworkslabs.tech/docs/events/webhooks/)
[All docs](https://spaceworkslabs.tech/docs/)

Space Works Events · Modules

# Team registration

[Documentation index](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/blob/4e3cf5a733517585bebd258a3cdd87d30d844863/docs/README.md)

Team events (hackathons, game jams, competitions) register people in teams. This page is the design contract for the feature;[Features](https://spaceworkslabs.tech/docs/events/features/) summarises the shipped behaviour.

## Scope
- One-off events only. Recurring series and occurrences stay individual; the series validators refuse team settings.
- Judging, submissions, and results are a separate feature built on top of teams (see[Future phases](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/blob/4e3cf5a733517585bebd258a3cdd87d30d844863/docs/FUTURE_PHASES.md) until it ships).

## Event settings

| Field | Type | Meaning |
| --- | --- | --- |
| `registrationMode` | `INDIVIDUAL`(default) or`TEAM` | Turns team registration on. |
| `teamMinSize` | `Int?`, at least 1 | Teams below this size are flaggedIncompleteto organisers and cannot be approved. |
| `teamMaxSize` | `Int?`, at least 2 and at least`teamMinSize` | Required in`TEAM`mode. Enforced under the event lock. |
| `soloPolicy` | `TEAMS_ONLY`,`SOLO_ALLOWED`(default),`SOLO_WITH_MATCHING` | Whether people may register without a team, and whether solo registrants can opt in to theLooking for a teamlist. |

Database CHECK constraints keep the sizes valid.`registrationMode`cannot change while the event has registrations, and`teamMaxSize`cannot drop below the current largest team. Organisers can set them when creating the event (the last step of the**Create event**dialog, with the same wording and checks) and edit them later in the event's**Publishing**section, under the sign-ups question. Both use the same`TeamSettingsFields`component.

## Capacity counts registration units

In`TEAM`mode`Event.capacity`counts**units**: each team is one unit and each solo registrant (an RSVP with no team) is one unit. A unit isconfirmedwhen the team or solo RSVP is`CONFIRMED`. Team members never consume extra units.

All unit counting happens inside the existing capacity transactions, which lock the`Event`row with`SELECT ... FOR UPDATE`(`reserveRsvp`,`confirmRsvpWithinCapacity`, cancel, restore, and the capacity-lowering check in`updateEvent`). Every team mutation takes the same lock first, so team mutations serialise with every other capacity change. A shared helper (`countConfirmedUnits(tx, eventId)`) replaces the plain confirmed-RSVP count wherever the event is in`TEAM`mode;`INDIVIDUAL`events keep the current query untouched.

Displays follow the same rule. The public registration card shows places taken in units. Organiser screens (event header, analytics, overview, dashboard home and organisation event lists, super-admin activity) show units against capacity ("3 / 3 teams & solo places", or "teams" when solo registration is off) and the number of people going separately.

## Team status

`Team.status`reuses`RsvpStatus`(`CONFIRMED`,`WAITLISTED`,`PENDING_APPROVAL`,`REJECTED`). Invariant: every RSVP with`teamId = T`has`status = T.status`. Code that changes a team's status updates the team row and all member RSVPs in the same transaction, guarded by the expected previous status (conditional`updateMany`), and queues one outbox status email per member.
- Creating a team decides its status with the same rules as an individual RSVP (`decideRsvpStatus`, applied to units): approval-required means`PENDING_APPROVAL`; otherwise`WAITLISTED`when confirmed units reach capacity, else`CONFIRMED`.
- Joining a team never changes capacity. The new RSVP takes the team's status.`REJECTED`teams cannot be joined. A join that would exceed`teamMaxSize`fails. The leader of a`REJECTED`team can still view it, remove members and disband it, and members can leave; rename, join/management link resets, leadership transfer and "looking for members" are refused (UI and cores).
- Organisers approve, reject, and promote**whole teams**. Individual approve/reject/promote on an RSVP that belongs to a team is refused with a message pointing to the team. Approving a team below`teamMinSize`is refused, and so is approving or promoting a team on a cancelled event (`isEventCancelled`, the guard automatic promotion uses, under the Event lock).
- When a unit is freed (a confirmed team disbanded, deleted or cancelled, a confirmed solo registrant cancelled or moved into a team), the existing auto-promotion applies to the oldest waitlisted**unit**(a team or solo RSVP), and only when the event is not approval-required.

## Joining

Both ways are always available in`TEAM`mode:
- **Join link.**The leader shares`/{orgSlug}/{eventSlug}/team/{joinToken}`. It opens the event's normal registration form with the team shown and fixed. The page reveals only the team name, current size, and maximum size. It never reveals member names. It respects event visibility and invite-only rules exactly like the event page, so it never reveals a hidden event to someone who could not otherwise see it. The leader can regenerate the token, which retires the old link.
-  **Leader adds a member.**From the team page, the leader enters a name and email. This creates a guest RSVP on the team (registration open checks apply; custom questions are skipped, as with organiser manual add), and the member is emailed their own ticket through the outbox. Duplicate attendees are refused by the existing`attendeeKey`unique indexes. On invite-only events this way is refused, as public guest registration is: an address on the invite list does not prove who typed it, so invitees sign in with their invited account and use the join link.
-  **Already registered on your own.**A solo registrant (an RSVP with no team) of the same event joins a team with its join link and keeps their registration and ticket (`joinTeamWithExistingRsvp`): - On the join page, a signed-in person's own registration for the event is detected server-side: a solo one gets**Join {team}**instead of the form; one already in this team links to the ticket; one in another team is told to leave it first. When this browser remembers a ticket for the event (the event page's saved RSVP), the page offers to join with it. The page also tells guests to use their ticket page. - The ticket page of a solo registrant on a`TEAM`event has**Join a team**, which accepts a pasted join link (absolute, relative, or without its scheme) or a bare join token. Management links are refused. - The ticket token proves the registration; an account-owned registration also needs that account signed in. The join token is looked up inside the registration's own event only, so another event's link never matches. - Under the event lock: the team size is rechecked, the RSVP takes the team's status, its seeker profile is hidden, its pending invitations and requests are cancelled, and a confirmed solo unit is freed and promotes the oldest waitlisted unit. A checked-in registration can only join a`CONFIRMED`team: the registration is locked and read again before that check (check-in takes only its row lock, not the Event's), and the move expects the check-in state it was decided on; organiser moves do the same. Rejected teams and declined registrations are refused. This works while the event and its page are published and the event has not ended (a withdrawn page refuses it, like the join page's 404), even after new registrations close, because it never adds a unit.

The event page's register button says what a`TEAM`event registers (**Register your team**, or**Register a team or yourself**when solo sign-ups are allowed; the waitlist and approval wording follows the same split). The wording lives in`lib/registrationLabel.ts`, shared with the dashboard's event-page preview.

The registration form, for a`TEAM`event, offers**Create a team**(team name required, unique per event ignoring case),**Join with a link**(explains how to get one), and**Register solo**only when`soloPolicy`allows it. With`SOLO_WITH_MATCHING`the solo option has an opt-in "List me as looking for a team" with a short headline (up to 120 characters) and up to 8 skills (each up to 30 characters).

## Team page and capabilities
- The leader receives a**team management link** `/team/{manageToken}`in the confirmation email. The raw token is random (at least 128 bits), shown once, and stored only as a SHA-256 hash (`Team.manageTokenHash`). Regenerating it invalidates the old link; the page moves to the new address and the new link is emailed to the leader. The check-in token (the ticket QR) never grants team management. When the leader's registration changes hands (a ticket transfer, or an organiser changing the leader's email) the link is rotated and the new one emailed to the new holder (`lib/rsvpHolder.ts`).
- A signed-in leader also reaches the team page from**Account → Registrations**without the token.
- On the team page the leader can rename the team, regenerate the join link, add or remove members, transfer leadership to another member, setLooking for members, and disband the team. Members (from their ticket page) see the team name, the leader's name, and members' names. They can leave the team; leaving cancels their RSVP.
- If the leader cancels their own registration, leadership passes to the longest-standing member; with no members left the team is deleted and its unit freed. A PER_TEAM leader whose order pays for the team, or anyone whose ticket is still owed at the desk, cancels from the order page instead (`PAID_ORDER`), which cancels the whole order and the team with it.
- Removing a member or disbanding cancels those RSVPs (they can register again solo or in another team). Disbanding frees the unit.

## Looking for a team (`SOLO_WITH_MATCHING`)
- Solo registrants opt in with a`TeamSeekerProfile`(headline, skills,`visible`). They can edit or hide it from their ticket page.
- The list shows display name (first name and last initial), headline, and skills. It never shows email, answers, or ticket links. Only leaders of non-rejected teams with free space (from the team page) and other visible seekers (from their ticket page) of the**same event**can see it. Pages that show it are`noindex`and private-cache.
- A leader can**invite**a seeker, and a seeker can**request**to join a team that isLooking for members. These are`TeamJoinRequest`rows (`INVITE`/`REQUEST`,`PENDING`/`ACCEPTED`/`DECLINED`/`CANCELLED`), at most one pending per team and RSVP. The other side accepts or declines on their page. No email is sent for requests in this version.
- The seeker list, the teams looking for members, and each side's pending invitations and requests are paged on the server,`TEAM_MATCHING_PAGE_SIZE`(20) at a time with**Show more**and a total from a separate count. Seekers are most recently updated first (keyset on`updatedAt DESC, id`); teams and requests are oldest first (`createdAt, id`). Search matches a seeker's headline, skills, or first name only (never the surname or email), and a team's name; the free-space test for teams is in the query, so full teams never take a place on a page. Further pages go through read-only actions that re-resolve the leader link or the ticket token and re-run the list's own rules on every page (`search`rate-limit bucket). Team members are not paged (bounded by`teamMaxSize`).
- Accepting moves the seeker's RSVP into the team under the event lock with the same move as joining by link (size rechecked, team status taken, profile hidden, other pending requests cancelled, freed solo unit promotes, checked-in registrations only into a`CONFIRMED`team).
- Saving the profile from the ticket page resets the edit form to the stored values (trimmed, duplicate skills dropped).

## Organisers

Organisation owners and admins, and anyone holding the event's`MANAGE_REGISTRATIONS`grant, manage teams (`resolveOrganiserEvent`, the same`canManageRegistrationsFor`check as individual registrations).
- Guests tab gets a**Teams**view: name, status, size and min/max, anIncompletebadge below`teamMinSize`, leader, and members. It is paged on the server, oldest first,`ORGANISER_TEAMS_PAGE_SIZE`(50) teams at a time with**Load more**(keyset cursor on`createdAt, id`). Search matches team names and members' names and emails (LIKE wildcards are literal), and the status filters (includingIncomplete) are applied in the query; the filter counts are aggregates. After a change, the view reloads as many pages as were showing. Searches and further pages go through the read-only`loadTeamsPage`action (same organiser check,`search`rate-limit bucket). The Move to team picker (People row and Teams view) searches on the server through`searchMoveTargets`(same organiser check,`search`bucket): non-rejected teams with room (full teams are excluded in SQL), alphabetical on a`nameKey, id`keyset,`TEAM_MOVE_TARGETS_PAGE_SIZE`(20) at a time with**Show more**. Actions: approve, reject, promote from waitlist (all as one unit), rename, remove a member, move a member to another team (size rechecked, member takes the target team's status), and delete a team with the existing undo pattern where practical.
- People view shows each RSVP's team. Filters gain "In a team" and "Solo". The People list is paged on the server (`ATTENDEES_PAGE_SIZE`, 50, newest first on a`createdAt, id`keyset,**Load more**) through`loadAttendeesPage`(`canManageRegistrationsFor`,`search`bucket); status, kind, team and search filters run in the query; the chip counts always cover the whole event, and a separate count of the matching registrations drives "Showing x of y" and the exports.**Export emails**downloads every match of the current filters from`/api/exports/events/:eventId/attendee-emails`, and**Export CSV**the full attendee CSV for the same matches (`/api/exports/events/:eventId/attendees`with the filter parameters; without them it is every registration, as before).
- Teams**Export CSV**(`/api/exports/events/:eventId/teams?status=&q=`) downloads every team matching the chip and search showing, read through the Teams query (`listEventTeamsForOrganiser`) in keyset batches of 200: team, status, size, incomplete, looking for members, leader and email, members (`Name <email>`), submission status (`None`without a project) and creation time. Same access as the Teams view; every denial is an empty 404; the audit (`TEAM_LIST_EXPORTED`) records filter names only. Cells go through`lib/csv.ts`.
- Both views keep their filters and search in the address bar and have a**Views**menu ([Features → Saved views](https://spaceworkslabs.tech/docs/events/features/#saved-views) ). People adds aNot checked instatus filter (`notCheckedIn`:`CONFIRMED`with no entry check-in) and presetsWaitlisted,Checked in,Not checked inandSolo. Teams adds aLooking for membersfilter (`looking`:`lookingForMembers`set) and presetsIncomplete,Pending approvalandLooking for members. Both filters run in the list query and have chip counts; a saved view is checked with the same`canManageRegistrationsFor`as the list.
- Permission checks are unchanged: the same checks that guard the individual RSVP actions guard the team ones. Every query is scoped by event and organisation, and a team id from the browser is always re-read with its`eventId`.
- Attendee CSV adds`Team`and`Team role`columns. The check-in desk and lookup show the team name, and the lookup also matches team names (teams of the same event only), listing that team's members. Badges gain a`{{team}}`merge field. The personal data export includes the team name and role.
- The post-event PDF report shows team counts (teams, solo registrants, average size). It never lists seeker profiles.

## Email

New outbox kinds, following`lib/outbox.ts`conventions (payload type, enqueue helper, validator, delivery branch, capability flag because they carry tokens):
- `team-created`: to the leader, with the team page link and the join link (also sent to the new leader on a handover and after the leader resets the team page link).
- `team-member-added`: to a member added by the leader, with their ticket link.

Status changes reuse the existing RSVP status email per member, naming the team.

## Organisation webhooks

Team changes raise the same per-registration webhooks as individual RSVPs (`docs/WEBHOOKS.md`), one per member, emitted only after the transaction has committed and with the same minimal payload (no team name, emails or tokens):
- Creating a team, joining by link, and a leader adding a member:`registration.created`.
- Whole-team approve, reject and promote, automatic team promotion after a unit is freed, and a registration moved into a team with a different status (seeker accepted, solo join by link, organiser move):`registration.status_changed`for each member whose status changed.
- A member leaving, a leader removing a member, and disbanding:`registration.status_changed`with`CANCELLED`. An organiser deleting a team (or its last member):`REMOVED`. Undoing that deletion: the restored status with`previousStatus: "REMOVED"`.

Undoing a team deletion (or the deletion of a team's last member) also restores each member's custom check-in list records, for lists that still belong to the event, exactly like the single-RSVP undo.

## Machine API

Out of scope for this version beyond safety: a registration without a team on a`TEAM`event is accepted when`soloPolicy`allows it, and otherwise refused with a deliberate error code (`TEAM_REQUIRED`). No API DTO gains team fields yet.

## Tickets

A team event can sell tickets (`lib/payments/teamOrders.ts`). Each order seats exactly one person, so group tickets are refused on team events (and team mode is refused while an event has group tickets).**Tickets → Who pays for teams**(`Event.teamTicketMode`, owners, admins and`EDIT_DETAILS`co-organisers, fixed after the first sale, audited`TEAM_TICKET_MODE_UPDATED`) chooses:
- **Every member**(`PER_MEMBER`, the default): the leader buys a ticket when creating the team, members buy theirs when joining (the join link shows the tickets), and solo registrants buy their own. A leader can't add members by email: members pay for themselves.
- **The leader, once per team**(`PER_TEAM`): the leader's ticket covers the team; members join free from the join link once it is paid.

Paid places are paid**up front**, never requested first:
- A leader's order creates the team in`PENDING_PAYMENT`with the leader as its only member, so "member status = team status" holds. It takes a unit while the hold lasts (`countConfirmedUnits`counts confirmed units plus held new teams and solo tickets), and nobody can join, be invited or be moved into it until it is paid.`Order.teamId`and`Order.teamName`mark the leader's order. When the hold ends unpaid the team is deleted and its name freed.
- A member paying to join (`PER_MEMBER`) has no team until the payment lands: their registration is`PENDING_PAYMENT`with`teamId`null and`Order.teamId`naming the team. The hold keeps their place in the team (`teamPlacesTaken`counts members plus live joining holds) but takes no unit.
- On payment (webhook, return page, hold expiry or settled by hand) the place is confirmed, or waits for approval (`PENDING_APPROVAL`) on an approval-required event; a joining member takes the team's status. The leader's team page link is emailed then. If the place was lost (the hold ended and the unit or team place was taken, its ticket type sold out, its promo code was used up, or the team was rejected or removed), the payment is refunded in full instead, checked before the team changes.
- A paid solo place waiting for approval is approved from the guest list like any request: under the Event lock its order must be confirmed with a settled payment, and it takes a unit only if one is free (`confirmRsvpWithinCapacity`). An unpaid order is never confirmed this way.
- A paid team or solo place never waits on the waitlist: a full event refuses it, and a member can't pay to join a waitlisted team. Free tickets keep the usual waitlist and promotion of whole units.
- On an approval-required event, team places are paid online (paying at the desk is refused); declining a paid solo registration refunds it in full, like rejecting a team.
- A member's joining order is marked (`Order.teamJoin`), so if the team is deleted while they pay, the payment is refunded rather than placed as a solo registration. A leader's unpaid team is deleted when its payment comes too late, as when the hold ends.
- **Rejecting a team**refunds every paid order of its members in full. Approving or promoting changes no money.
- Registrations from a paid order are cancelled**as an order**(the order page under the refund policy, or Guests → Payment): a cancelled member leaves their team as if they had cancelled, and cancelling a`PER_TEAM`leader's order cancels the whole team (members are emailed). Leaders can't remove paid members or disband a team with paid members (a confirmed paid order), and organisers can't delete such a team; leaving from the ticket page points paid members to the order page.
- Payments, settlement and cancellations raise the usual registration webhooks.

## Tests
- Integration (`tests/integration/teams.db.test.ts`): concurrent team creation for the last unit never oversells; concurrent joins never exceed`teamMaxSize`; team approval updates all members atomically; accepting a seeker frees a unit and promotes the oldest waitlisted unit; cross-event and cross-organisation team ids are refused; a manage token for one team cannot act on another; a solo registrant joining by link frees and promotes their unit, cancels pending requests and hides their profile, while other events' links, full teams and checked-in moves into an unconfirmed team are refused; the Teams view pages, searches and filters within one event; the check-in lookup matches team names within the event; whole-team approval, deletion, promotion, disbanding and undo send one minimal`registration.status_changed`webhook per member; and undoing a team deletion restores the members' custom check-in list records.
- Unit tests: validators, the unit-count helper, status decisions, DTOs for the join page and seeker list (forbidden fields), the token hashing, pasted join-link parsing, and the Teams view cursor and search escaping.

## Applications

A TEAM event can take applications ([ADMISSION.md](https://spaceworkslabs.tech/docs/events/admission/) ): the team applies as one application (solo registrants as their own), the leader answers offers and, for paid places, pays once for the team (PER_TEAM only; paying per member isn't supported with applications yet and is refused). On these events team places are not paid up front: the leader's order waits as a request until the offer is accepted. While the leader pays, the team holds its unit (team`PENDING_PAYMENT`) and the members, who have no order, stay pending until the payment confirms them all; an applying team is never deleted when the leader's hold ends. Approve, decline and promote in the Teams view refuse application teams. A solo applicant who joins a team leaves their solo application (an applicant holding an offer can't join a team).

From[SpaceWorks-Events/docs/TEAMS.md](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/blob/4e3cf5a733517585bebd258a3cdd87d30d844863/docs/TEAMS.md) at 4e3cf5a, updated 2026-10-30.[Suggest a change](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/edit/main/docs/TEAMS.md)  [PreviousPaid tickets](https://spaceworkslabs.tech/docs/events/payments/) [NextApplications and shortlisting](https://spaceworkslabs.tech/docs/events/admission/)

On this page
- [Scope](#scope)
- [Event settings](#event-settings)
- [Capacity counts registration units](#capacity-counts-registration-units)
- [Team status](#team-status)
- [Joining](#joining)
- [Team page and capabilities](#team-page-and-capabilities)
- [Looking for a team (SOLO_WITH_MATCHING)](#looking-for-a-team-solo_with_matching)
- [Organisers](#organisers)
- [Email](#email)
- [Organisation webhooks](#organisation-webhooks)
- [Machine API](#machine-api)
- [Tickets](#tickets)
- [Tests](#tests)
- [Applications](#applications)
