You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base URL: https://{api-id}.execute-api.{region}.amazonaws.com (stage is
part of the domain for HTTP API default stage $default).
All authenticated routes require Authorization: Bearer <Cognito ID token>.
Roles are enforced two ways: API Gateway's JWT authorizer confirms the
token is valid and attaches claims (including cognito:groups); each
Lambda additionally checks the specific group/ownership rule noted below
(defense in depth — a misconfigured route scope shouldn't be the only
thing standing between a User and an Admin action).
Auth — /auth/* (public)
Thin wrappers around Cognito so the client only ever talks to one API.
Method
Path
Body
Notes
POST
/auth/signup
{ email, password, name, role }
role ∈ USER, ORGANIZER. Admins are seeded out-of-band (see scripts/seed-admin.ts), never self-service.
POST
/auth/confirm-signup
{ email, code }
Confirms the emailed verification code.
POST
/auth/login
{ email, password }
Returns idToken, accessToken, refreshToken.
POST
/auth/refresh
{ refreshToken, email }
Returns a new idToken/accessToken pair.
POST
/auth/forgot-password
{ email }
Triggers Cognito's reset-code email.
POST
/auth/reset-password
{ email, code, newPassword }
Contact — /contact (public)
Method
Path
Body
Notes
POST
/contact
{ name, email, message }
Publishes CONTACT_MESSAGE_RECEIVED → emails the team, with the sender set as reply-to. Throttled the same as /auth/*. Returns 202 { received: true }.
Events — /events/*
Method
Path
Auth
Notes
POST
/events
Organizer
Creates event, status = PENDING_REVIEW.
GET
/events
Public
Lists APPROVED upcoming events. Query: category, from, to, limit, cursor.
GET
/events/{eventId}
Public
Event detail. PENDING_REVIEW/REJECTED events are hidden from non-owners.
PUT
/events/{eventId}
Organizer (owner)
Editing a non-PENDING_REVIEW event resets it to PENDING_REVIEW for re-approval (prevents bait-and-switch after approval).
DELETE
/events/{eventId}
Organizer (owner) or Admin
Soft delete — sets status = CANCELLED, does not remove history.
Fails with 409 if already registered, event full, or event not APPROVED/in the future. Publishes REGISTRATION_CONFIRMED → confirmation email with ticket link.
DELETE
/events/{eventId}/register
User (self)
Cancels own registration, decrements registeredCount.