Get user data
Retrieve the authenticated user’s profile data with optional field filtering.Endpoint
Query parameters
Comma-separated list of fields to retrieve. If omitted, all fields are returned.Allowed values:
id, email, username, resume, created_at, isliveExample: fields=username,resume,isliveResponse
Returns a user object with requested fields. The exact structure depends on which fields are requested.User’s database ID
User’s email address
User’s unique username
User’s resume data in structured format. See the Resume type for the complete schema.
Account creation timestamp in ISO 8601 format
Whether the user’s resume is published and publicly visible
Example
Response
Error responses
404 Not Found
Returned when the user is not found or not authenticated:Update user data
Update one or more fields in the authenticated user’s profile.Endpoint
Request body
Send a JSON object with the fields to update. Only include fields you want to change.New email address
New username. Must be unique across all users.
Updated resume data structure
Whether the resume should be publicly visible
Website style preference. Must be either
"simple" or "bento".Response
Returns the updated user object with all fields:Example
Error responses
400 Bad Request
Returned when no fields are provided:401 Unauthorized
Returned when the user is not authenticated:409 Conflict
Returned when trying to use a username that’s already taken:500 Internal Server Error
Returned when the database update fails:Implementation details
Username uniqueness
The update endpoint checks for username conflicts before updating:- Queries the database for existing users with the requested username
- Allows the update if no other user has that username
- Returns 409 Conflict if another user already has that username
- Handles database-level uniqueness constraint violations (error code 23505)
/app/api/user/update/route.ts:32-53
Field filtering
The GET endpoint validates requested fields against an allowed list before querying:/app/api/user/route.ts:14-21