Backend API
Users API
User management endpoints for profiles and account settings
Overview
The Users API manages user profiles, account settings, and user data.
Endpoints
| Method | Endpoint | Description | Permission |
|---|---|---|---|
| GET | /api/users | List users | users:read |
| GET | /api/users/:id | Get user profile | profile:read |
| PATCH | /api/users/:id | Update user profile | profile:write |
| DELETE | /api/users/:id | Delete user account | users:delete |
List Users
Get paginated list of users (admin only).
Request
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 10 | Items per page |
role | string | - | Filter by role |
search | string | - | Search by name/email |
Response
Get User Profile
Get detailed user profile information.
Request
Response
Update User Profile
Update user profile information.
Request
Updatable Fields
| Field | Type | Description |
|---|---|---|
firstName | string | First name |
lastName | string | Last name |
phone | string | Phone number |
location | string | Location |
bio | string | Biography |
skills | string[] | Skills list |
avatar | string | Avatar URL |
Response
Delete User Account
Delete a user account (admin or self).
Request
Response
Add Work Experience
Add work experience to profile.
Request
Response
Add Education
Add education to profile.
Request
Response
Types
Domain Types
The shared package also defines domain types with utility functions:
Frontend Integration
Permission Matrix
| Action | ADMIN | EMPLOYER | TALENT |
|---|---|---|---|
| List users | ✓ | - | - |
| View any profile | ✓ | - | - |
| View own profile | ✓ | ✓ | ✓ |
| Update own profile | ✓ | ✓ | ✓ |
| Delete any user | ✓ | - | - |
| Delete own account | ✓ | ✓ | ✓ |