Endpoint
Authentication
Requires a valid Supabase session with theadmin role in user metadata.
Path Parameters
UUID of the waitlist request to update
Request Body
All fields are optional. At least one field must be provided.New status value. Must be one of:
requestedcontactedinvitedactivatedarchived
Admin notes about this request. Maximum 2000 characters. Pass
null or empty string to clear notes.Priority level from 0 to 10 (higher = more urgent). Pass
null or empty string to clear priority.If
true, sets last_contacted_at to the current timestampResponse
The updated waitlist request object with all fieldsSee the List Waitlist endpoint for the full object schema.
Error Responses
- 400 Bad Request: No updates provided, invalid status, or invalid request ID
- 401 Unauthorized: Not authenticated
- 403 Forbidden: Not an admin user or cross-origin request
- 404 Not Found: Waitlist entry not found
- 415 Unsupported Media Type: Content-Type is not application/json
- 500 Internal Server Error: Database update failed
Example Request
Example Response
Validation Rules
- status: Must be a valid waitlist status string
- notes: Trimmed and limited to 2000 characters. Empty strings become
null. - priority: Rounded to integer, clamped to range 0-10. Empty strings or
nullclear the priority.
Security
- Same-origin enforcement: Requests must come from the same origin
- Admin role required: Uses
requireAdminUser()helper - JSON validation: Content-Type must be application/json
- Service role client: Bypasses RLS for database access
Source
Implementation:frontend/app/api/admin/waitlist/[id]/route.ts