Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Fireinthebellyy/ftb-web/llms.txt
Use this file to discover all available pages before exploring further.
The User Management API provides endpoints for managing user profiles, onboarding data, and administrative user operations.
Authentication
All User Management API endpoints require authentication with an active session.
Profile Management
Get Current User Profile
curl -X GET "https://ftbhustle.com/api/profile" \
-H "Cookie: session=YOUR_SESSION_TOKEN"
Retrieve the current authenticated user’s profile information.
Response
User profile object
Array of opportunity interests
College or institute name
Contact phone number (10 digits)
{
"user": {
"id": "user123",
"name": "John Doe",
"email": "john@example.com",
"image": "https://example.com/avatar.jpg",
"fieldInterests": ["Technology", "AI", "Web Development"],
"opportunityInterests": ["hackathon", "internship"],
"dateOfBirth": "2000-05-15",
"collegeInstitute": "IIT Delhi",
"contactNumber": "9876543210",
"currentRole": "Computer Science Student"
}
}
Update User Profile
curl -X POST "https://ftbhustle.com/api/profile" \
-H "Cookie: session=YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"fieldInterests": ["AI", "Web Development"],
"contactNumber": "9876543210",
"collegeInstitute": "IIT Delhi"
}'
Update the current user’s profile information.
Request Body
Array of field interest strings
Array of opportunity interest strings
Date of birth (YYYY-MM-DD format)
College or institute name (alphanumeric with spaces and common punctuation)
Current role or position (max 60 characters)
Response
The updated user profile object
{
"user": {
"id": "user123",
"name": "John Doe",
"email": "john@example.com",
"image": null,
"fieldInterests": ["AI", "Web Development"],
"opportunityInterests": [],
"dateOfBirth": null,
"collegeInstitute": "IIT Delhi",
"contactNumber": "9876543210",
"currentRole": null
}
}
Validation Rules
- name: Required, non-empty string
- image: Optional string
- fieldInterests: Array of strings
- opportunityInterests: Array of strings
- dateOfBirth: Valid date string
- collegeInstitute: Alphanumeric with spaces,
.&'()- allowed, cannot be all numbers
- contactNumber: Exactly 10 digits
- currentRole: Max 60 characters
Onboarding
Get Onboarding Profile
curl -X GET "https://ftbhustle.com/api/onboarding" \
-H "Cookie: session=YOUR_SESSION_TOKEN"
Retrieve the current user’s onboarding profile.
Response
Onboarding profile object (null if not completed)Show Onboarding Profile Object
User persona: student or society
Location type: city or state
Custom field of study (when fieldOfStudy is “Other”)
Array of opportunity interests
Array of domain preferences
{
"profile": {
"id": "profile-123",
"userId": "user123",
"persona": "student",
"locationType": "city",
"locationValue": "Mumbai",
"educationLevel": "undergraduate",
"fieldOfStudy": "Computer Science",
"fieldOther": null,
"opportunityInterests": ["internship", "hackathon"],
"domainPreferences": ["AI", "Web Development"],
"struggles": ["Finding relevant opportunities", "Time management"],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
}
Create or Update Onboarding Profile
curl -X POST "https://ftbhustle.com/api/onboarding" \
-H "Cookie: session=YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"persona": "student",
"locationType": "city",
"locationValue": "Mumbai",
"educationLevel": "undergraduate",
"fieldOfStudy": "Computer Science",
"opportunityInterests": ["internship", "hackathon"],
"domainPreferences": ["AI", "Web Development"],
"struggles": ["Finding relevant opportunities"]
}'
Create or update the user’s onboarding profile.
Request Body
User persona: student or society
Location type: city or state (student only)
Location value (student only)
Education level (student only)
Field of study (student only)
Custom field of study when fieldOfStudy is “Other” (student only)
Array of opportunity interest strings (student only)
Array of domain preference strings (student only)
Array of struggle strings (student only)
Response
The created or updated onboarding profile
{
"profile": {
"id": "profile-123",
"persona": "student",
"locationType": "city",
"locationValue": "Mumbai",
"educationLevel": "undergraduate",
"fieldOfStudy": "Computer Science",
"fieldOther": null,
"opportunityInterests": ["internship", "hackathon"],
"domainPreferences": ["AI", "Web Development"],
"struggles": ["Finding relevant opportunities"],
"createdAt": "2024-03-15T14:30:00Z",
"updatedAt": "2024-03-15T14:30:00Z"
}
}
Admin User Management
List All Users
curl -X GET "https://ftbhustle.com/api/admin/users" \
-H "Cookie: session=YOUR_SESSION_TOKEN"
Retrieve a list of all users. Admin only.
Response
Array of user objects
User role: user, member, or admin
Account creation timestamp
Email verification status
{
"users": [
{
"id": "user123",
"name": "John Doe",
"email": "john@example.com",
"role": "user",
"image": "https://example.com/avatar.jpg",
"createdAt": "2024-01-15T10:00:00Z",
"emailVerified": true
},
{
"id": "user456",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin",
"image": "https://example.com/avatar2.jpg",
"createdAt": "2023-12-01T08:00:00Z",
"emailVerified": true
}
]
}
Update User Role
curl -X PATCH "https://ftbhustle.com/api/admin/users/user123" \
-H "Cookie: session=YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "member"
}'
Update a user’s role. Admin only.
Path Parameters
The unique identifier of the user to update
Request Body
New role: user, member, or admin
Response
{
"user": {
"id": "user123",
"name": "John Doe",
"email": "john@example.com",
"role": "member"
}
}
Restrictions
- Admins cannot change their own role
- Role must be one of:
user, member, admin
User Roles
User
Regular users with basic access. Created opportunities require approval before being published.
Member
Trusted members who can publish opportunities directly without approval.
Admin
Full access to all features including user management, content moderation, and administrative functions.
Error Responses
All API endpoints return appropriate HTTP status codes:
- 401 Unauthorized: User is not authenticated
- 403 Forbidden: User doesn’t have required permissions
- 404 Not Found: User or resource not found
- 400 Bad Request: Validation error or invalid input
- 500 Internal Server Error: Server error
{
"error": "Invalid role. Must be 'user', 'member', or 'admin'"
}
Validation Error Response
{
"error": "Invalid contactNumber"
}