API Routes
Pre-built RESTful endpoints for waitlist operations with request validation and error handling.
Add Email to Waitlist
POST
/api/waitlist
Property | Type | Example |
---|---|---|
email | string required | user@example.com |
referredByCode | string | dBjd8-Xk |
Types
Route Handler
Key Design Decisions
- Uses Zod for runtime input validation and type inference.
- Returns minimal public information in responses for security.
- Handles referral tracking as an optional flow.
- Returns ISO formatted dates for universal compatibility.
- Implements standardized error responses with appropriate HTTP status codes.
- Separates type definitions from route logic for better maintainability.