The Users API manages everything related to job seeker accounts. Authenticated users can read and update their full profile — contact details, professional bio, skills, a structured work-history, and education entries. Two dedicated upload endpoints handle binary file storage: one for PDF résumés (stored underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iDevRanjan/lws-ra-b4-assignment-five/llms.txt
Use this file to discover all available pages before exploring further.
/uploads/resumes/) and one for profile pictures (stored under /uploads/profiles/). Résumé metadata (original filename, size in MB, upload timestamp) is persisted on the User record and snapshotted onto each Application at submission time. A single public endpoint lets anyone look up a user by UUID — useful for company-side applicant review flows.
User Object
Unique user identifier.
Full name.
Registered email address (unique).
Always
USER.Professional headline (e.g.
"Frontend Developer").Short professional biography.
City of residence.
State or province.
Country.
Postal / ZIP code.
Derived string
"city, country" kept for backwards compatibility.Contact phone number.
Personal or portfolio website URL.
LinkedIn profile URL.
GitHub profile URL.
Server-relative path to the uploaded résumé (e.g.
/uploads/resumes/abc123.pdf).Original filename of the uploaded résumé.
File size formatted as a string (e.g.
"1.42 MB").Timestamp of the most recent résumé upload.
Server-relative path to the profile picture (e.g.
/uploads/profiles/xyz789.jpg).Entry, Mid, Senior, Expert, or Lead.JSON array of skill tags (e.g.
["React", "Node.js"]).JSON array of education entries.
Account creation timestamp.
Last-updated timestamp.
Endpoints
GET /api/users/profile
Fetch the complete profile of the currently authenticated job seeker. Thepassword field is excluded from the response.
Auth: Required — Bearer token (USER role)
Request
No parameters. The user identity is resolved from the JWT.Response
true on success.Full User object (password excluded).
Example
PUT /api/users/profile
Update the authenticated user’s profile. Only the fields provided in the request body are changed; omitted fields retain their current values. When bothcity and country are provided, the computed location string is updated automatically.
Auth: Required — Bearer token (USER role)
The
experience array has server-side validation. Every item must include title, companyName, employmentType, startDate, location, and description. A 400 is returned if any item is missing a required field.Request
Full name.
Professional headline.
Short biography.
City of residence.
State or province.
Country.
Postal / ZIP code.
Contact phone number.
Portfolio website URL.
LinkedIn URL.
GitHub URL.
Seniority level —
Entry, Mid, Senior, Expert, or Lead.Replaces the entire skills array.
Replaces the entire work-history array. Each item must include
title, companyName, employmentType, startDate, location, and description.Replaces the entire education array.
Response
true on successful update.Updated User object (password field stripped).
Example
POST /api/users/resume
Upload a résumé PDF. The request must usemultipart/form-data encoding with the file attached under the field name resume. The server saves the file under /uploads/resumes/, records the original filename, converts the file size to a "X.XX MB" string, and stores the upload timestamp. A résumé must be uploaded before a user can submit any job application.
Auth: Required — Bearer token (USER role)
Request
The PDF résumé file. Use
Content-Type: multipart/form-data. The multer middleware enforces the resume field name.Response
true on successful upload.Example
POST /api/users/profile-picture
Upload a profile picture. Usesmultipart/form-data with the file under the field name profilePicture. The image is stored under /uploads/profiles/. If the user already has a profile picture, the old file is deleted from disk before the new one is saved.
Auth: Required — Bearer token (USER role)
Request
The image file (JPEG, PNG, etc.). Use
Content-Type: multipart/form-data.Response
true on successful upload."Profile picture uploaded successfully"The updated User object (password excluded), including the new
profilePictureUrl.Example
GET /api/users/:id
Retrieve any user’s public profile by their UUID. No authentication required. Thepassword field is always excluded. This endpoint is used by companies to review applicant profiles.
Auth: None
Request
The UUID of the user to look up.
Response
true when the user is found.Full User object with
password excluded.Example
Error Reference
| Status | Message | Cause |
|---|---|---|
400 | Please upload a file | Multipart request sent without a file attached |
400 | Experience items must have companyName, … | Experience array item is missing required fields |
401 | Not authorized, no token | Missing Authorization header |
403 | User role COMPANY is not authorized… | COMPANY token used on a USER-only route |
404 | User not found | No user found for the given ID or token |