openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 1.0.0 description: ManaBandhu API - Community super app for South Asian immigrants in the US servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: profile description: User profile and onboarding - name: home description: Personalized home dashboard - name: rooms description: Housing and roommate listings - name: rides description: Ride sharing and travel coordination - name: community description: Community posts and discussions - name: chat description: Direct and group messaging - name: jobs description: Job listings and referrals - name: immigration description: Immigration resources and guides - name: expenses description: Shared expense management - name: events description: Community events - name: notifications description: In-app and push notifications - name: saved description: Saved items across modules - name: reports description: Content reporting - name: admin description: Administration and moderation paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" # ── PROFILE ────────────────────────────────────────────── /v1/profile/me: get: operationId: getMyProfile tags: [profile] summary: Get authenticated user's profile security: - bearerAuth: [] responses: "200": description: Profile content: application/json: schema: $ref: "#/components/schemas/UserProfile" "401": $ref: "#/components/responses/Unauthorized" put: operationId: updateMyProfile tags: [profile] summary: Update authenticated user's profile security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateProfileRequest" responses: "200": description: Updated profile content: application/json: schema: $ref: "#/components/schemas/UserProfile" "401": $ref: "#/components/responses/Unauthorized" /v1/profile/onboarding: post: operationId: completeOnboarding tags: [profile] summary: Complete onboarding flow security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OnboardingRequest" responses: "200": description: Onboarding complete, profile returned content: application/json: schema: $ref: "#/components/schemas/UserProfile" "401": $ref: "#/components/responses/Unauthorized" /v1/profile/{userId}: get: operationId: getPublicProfile tags: [profile] summary: Get a public user profile security: - bearerAuth: [] parameters: - name: userId in: path required: true schema: type: string responses: "200": description: Public profile content: application/json: schema: $ref: "#/components/schemas/PublicUserProfile" "404": $ref: "#/components/responses/NotFound" /v1/profile/me/block: post: operationId: blockUser tags: [profile] summary: Block a user security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: targetUserId: type: string required: [targetUserId] responses: "200": description: User blocked content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── HOME DASHBOARD ──────────────────────────────────────── /v1/home/feed: get: operationId: getHomeFeed tags: [home] summary: Get personalized home dashboard feed security: - bearerAuth: [] responses: "200": description: Home feed content: application/json: schema: $ref: "#/components/schemas/HomeFeed" # ── ROOMS ───────────────────────────────────────────────── /v1/rooms: get: operationId: listRooms tags: [rooms] summary: List room listings with filters security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: city in: query schema: type: string - name: state in: query schema: type: string - name: minRent in: query schema: type: number - name: maxRent in: query schema: type: number - name: roomType in: query schema: type: string - name: furnished in: query schema: type: boolean - name: availableFrom in: query schema: type: string format: date - name: search in: query schema: type: string - name: sortBy in: query schema: type: string enum: [createdAt, rent, availableDate] default: createdAt responses: "200": description: Paginated room listings content: application/json: schema: $ref: "#/components/schemas/RoomListingPage" post: operationId: createRoom tags: [rooms] summary: Create a room listing security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateRoomRequest" responses: "201": description: Created room listing content: application/json: schema: $ref: "#/components/schemas/RoomListing" /v1/rooms/{id}: get: operationId: getRoom tags: [rooms] summary: Get a room listing by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Room listing content: application/json: schema: $ref: "#/components/schemas/RoomListing" "404": $ref: "#/components/responses/NotFound" put: operationId: updateRoom tags: [rooms] summary: Update a room listing (owner only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateRoomRequest" responses: "200": description: Updated room listing content: application/json: schema: $ref: "#/components/schemas/RoomListing" delete: operationId: deleteRoom tags: [rooms] summary: Delete a room listing (owner only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /v1/rooms/my: get: operationId: getMyRooms tags: [rooms] summary: Get current user's room listings security: - bearerAuth: [] responses: "200": description: User's room listings content: application/json: schema: type: array items: $ref: "#/components/schemas/RoomListing" # ── RIDES ───────────────────────────────────────────────── /v1/rides: get: operationId: listRides tags: [rides] summary: List ride offers with filters security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: fromCity in: query schema: type: string - name: toCity in: query schema: type: string - name: date in: query schema: type: string format: date - name: seats in: query schema: type: integer - name: recurring in: query schema: type: boolean - name: search in: query schema: type: string responses: "200": description: Paginated ride offers content: application/json: schema: $ref: "#/components/schemas/RidePage" post: operationId: createRide tags: [rides] summary: Create a ride offer security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateRideRequest" responses: "201": description: Created ride content: application/json: schema: $ref: "#/components/schemas/Ride" /v1/rides/{id}: get: operationId: getRide tags: [rides] summary: Get a ride by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Ride details content: application/json: schema: $ref: "#/components/schemas/Ride" "404": $ref: "#/components/responses/NotFound" put: operationId: updateRide tags: [rides] summary: Update a ride (driver only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateRideRequest" responses: "200": description: Updated ride content: application/json: schema: $ref: "#/components/schemas/Ride" /v1/rides/{id}/status: put: operationId: updateRideStatus tags: [rides] summary: Update ride status (driver only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: status: $ref: "#/components/schemas/RideStatus" required: [status] responses: "200": description: Updated ride content: application/json: schema: $ref: "#/components/schemas/Ride" /v1/rides/{id}/requests: get: operationId: getRideRequests tags: [rides] summary: Get all requests for a ride (driver only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Ride requests content: application/json: schema: type: array items: $ref: "#/components/schemas/RideRequest" post: operationId: requestRideSeat tags: [rides] summary: Request a seat on a ride security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: seats: type: integer default: 1 message: type: string required: [seats] responses: "201": description: Ride request created content: application/json: schema: $ref: "#/components/schemas/RideRequest" /v1/rides/{id}/requests/{requestId}: put: operationId: updateRideRequest tags: [rides] summary: Approve or reject a ride request (driver only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string - name: requestId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: status: type: string enum: [approved, rejected] required: [status] responses: "200": description: Updated request content: application/json: schema: $ref: "#/components/schemas/RideRequest" /v1/rides/my: get: operationId: getMyRides tags: [rides] summary: Get current user's rides (as driver and rider) security: - bearerAuth: [] responses: "200": description: User's rides content: application/json: schema: type: object properties: asDriver: type: array items: $ref: "#/components/schemas/Ride" asRider: type: array items: $ref: "#/components/schemas/RideRequest" required: [asDriver, asRider] # ── COMMUNITY ───────────────────────────────────────────── /v1/communities: get: operationId: listCommunities tags: [community] summary: List all communities security: - bearerAuth: [] responses: "200": description: Communities content: application/json: schema: type: array items: $ref: "#/components/schemas/Community" /v1/communities/{id}: get: operationId: getCommunity tags: [community] summary: Get community by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Community content: application/json: schema: $ref: "#/components/schemas/Community" /v1/communities/{id}/join: post: operationId: joinCommunity tags: [community] summary: Join a community security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Joined content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: leaveCommunity tags: [community] summary: Leave a community security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Left content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /v1/posts: get: operationId: listPosts tags: [community] summary: List community posts security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: communityId in: query schema: type: string - name: tag in: query schema: type: string - name: search in: query schema: type: string - name: sortBy in: query schema: type: string enum: [createdAt, reactions, comments] default: createdAt responses: "200": description: Paginated posts content: application/json: schema: $ref: "#/components/schemas/PostPage" post: operationId: createPost tags: [community] summary: Create a community post security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreatePostRequest" responses: "201": description: Created post content: application/json: schema: $ref: "#/components/schemas/Post" /v1/posts/{id}: get: operationId: getPost tags: [community] summary: Get post by ID with comments security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Post with comments content: application/json: schema: $ref: "#/components/schemas/PostWithComments" "404": $ref: "#/components/responses/NotFound" put: operationId: updatePost tags: [community] summary: Update a post (author only) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreatePostRequest" responses: "200": description: Updated post content: application/json: schema: $ref: "#/components/schemas/Post" delete: operationId: deletePost tags: [community] summary: Delete a post (author or moderator) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /v1/posts/{id}/comments: post: operationId: createComment tags: [community] summary: Add a comment to a post security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: content: type: string parentCommentId: type: string required: [content] responses: "201": description: Created comment content: application/json: schema: $ref: "#/components/schemas/Comment" /v1/posts/{id}/reactions: post: operationId: reactToPost tags: [community] summary: React to a post security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: type: type: string enum: [like, helpful, insightful, celebrate] required: [type] responses: "200": description: Reaction recorded content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: removeReaction tags: [community] summary: Remove reaction from a post security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Reaction removed content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── CHAT ────────────────────────────────────────────────── /v1/conversations: get: operationId: listConversations tags: [chat] summary: List user's conversations security: - bearerAuth: [] responses: "200": description: Conversations content: application/json: schema: type: array items: $ref: "#/components/schemas/Conversation" post: operationId: createConversation tags: [chat] summary: Start or find a direct conversation security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: participantIds: type: array items: type: string name: type: string isGroup: type: boolean required: [participantIds] responses: "201": description: Conversation content: application/json: schema: $ref: "#/components/schemas/Conversation" /v1/conversations/{id}/messages: get: operationId: getMessages tags: [chat] summary: Get messages in a conversation security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string - name: before in: query schema: type: string - name: limit in: query schema: type: integer default: 50 responses: "200": description: Messages content: application/json: schema: type: array items: $ref: "#/components/schemas/Message" post: operationId: sendMessage tags: [chat] summary: Send a message security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SendMessageRequest" responses: "201": description: Sent message content: application/json: schema: $ref: "#/components/schemas/Message" /v1/conversations/{id}/read: post: operationId: markConversationRead tags: [chat] summary: Mark conversation as read security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Marked read content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── JOBS ────────────────────────────────────────────────── /v1/jobs: get: operationId: listJobs tags: [jobs] summary: List job listings with filters security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: search in: query schema: type: string - name: location in: query schema: type: string - name: remote in: query schema: type: string enum: [remote, hybrid, onsite] - name: employmentType in: query schema: type: string - name: experienceLevel in: query schema: type: string - name: sponsorship in: query schema: type: boolean - name: sortBy in: query schema: type: string enum: [postedAt, relevance] default: postedAt responses: "200": description: Paginated job listings content: application/json: schema: $ref: "#/components/schemas/JobPage" post: operationId: createJob tags: [jobs] summary: Post a community job listing security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateJobRequest" responses: "201": description: Created job listing content: application/json: schema: $ref: "#/components/schemas/Job" /v1/jobs/{id}: get: operationId: getJob tags: [jobs] summary: Get job listing by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Job listing content: application/json: schema: $ref: "#/components/schemas/Job" "404": $ref: "#/components/responses/NotFound" # ── IMMIGRATION ─────────────────────────────────────────── /v1/immigration/categories: get: operationId: listImmigrationCategories tags: [immigration] summary: List immigration resource categories security: - bearerAuth: [] responses: "200": description: Categories content: application/json: schema: type: array items: $ref: "#/components/schemas/ImmigrationCategory" /v1/immigration/resources: get: operationId: listImmigrationResources tags: [immigration] summary: List immigration resources security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: categoryId in: query schema: type: string - name: search in: query schema: type: string - name: tag in: query schema: type: string responses: "200": description: Immigration resources content: application/json: schema: $ref: "#/components/schemas/ImmigrationResourcePage" /v1/immigration/resources/{id}: get: operationId: getImmigrationResource tags: [immigration] summary: Get an immigration resource by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Immigration resource content: application/json: schema: $ref: "#/components/schemas/ImmigrationResource" "404": $ref: "#/components/responses/NotFound" # ── EXPENSES ────────────────────────────────────────────── /v1/expense-groups: get: operationId: listExpenseGroups tags: [expenses] summary: List user's expense groups security: - bearerAuth: [] responses: "200": description: Expense groups content: application/json: schema: type: array items: $ref: "#/components/schemas/ExpenseGroup" post: operationId: createExpenseGroup tags: [expenses] summary: Create an expense group security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: type: string memberIds: type: array items: type: string required: [name] responses: "201": description: Created expense group content: application/json: schema: $ref: "#/components/schemas/ExpenseGroup" /v1/expense-groups/{id}: get: operationId: getExpenseGroup tags: [expenses] summary: Get expense group by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Expense group with balances content: application/json: schema: $ref: "#/components/schemas/ExpenseGroupDetail" /v1/expense-groups/{id}/expenses: get: operationId: listExpenses tags: [expenses] summary: List expenses in a group security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Expenses content: application/json: schema: type: array items: $ref: "#/components/schemas/Expense" post: operationId: createExpense tags: [expenses] summary: Add an expense to a group security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateExpenseRequest" responses: "201": description: Created expense content: application/json: schema: $ref: "#/components/schemas/Expense" /v1/expense-groups/{id}/settlements: post: operationId: recordSettlement tags: [expenses] summary: Record a settlement between two members security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: fromUserId: type: string toUserId: type: string amountCents: type: integer note: type: string required: [fromUserId, toUserId, amountCents] responses: "201": description: Settlement recorded content: application/json: schema: $ref: "#/components/schemas/Settlement" # ── EVENTS ──────────────────────────────────────────────── /v1/events: get: operationId: listEvents tags: [events] summary: List events with filters security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: city in: query schema: type: string - name: fromDate in: query schema: type: string format: date - name: toDate in: query schema: type: string format: date - name: search in: query schema: type: string - name: online in: query schema: type: boolean responses: "200": description: Paginated events content: application/json: schema: $ref: "#/components/schemas/EventPage" post: operationId: createEvent tags: [events] summary: Create an event security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateEventRequest" responses: "201": description: Created event content: application/json: schema: $ref: "#/components/schemas/Event" /v1/events/{id}: get: operationId: getEvent tags: [events] summary: Get event by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Event details content: application/json: schema: $ref: "#/components/schemas/Event" "404": $ref: "#/components/responses/NotFound" /v1/events/{id}/rsvp: post: operationId: rsvpToEvent tags: [events] summary: RSVP to an event security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: status: type: string enum: [going, maybe, not_going] required: [status] responses: "200": description: RSVP recorded content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: cancelRsvp tags: [events] summary: Cancel RSVP security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: RSVP cancelled content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── NOTIFICATIONS ───────────────────────────────────────── /v1/notifications: get: operationId: listNotifications tags: [notifications] summary: Get user notifications security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 30 - name: unreadOnly in: query schema: type: boolean responses: "200": description: Notifications content: application/json: schema: $ref: "#/components/schemas/NotificationPage" /v1/notifications/unread-count: get: operationId: getUnreadNotificationCount tags: [notifications] summary: Get unread notification count security: - bearerAuth: [] responses: "200": description: Unread count content: application/json: schema: type: object properties: count: type: integer required: [count] /v1/notifications/{id}/read: put: operationId: markNotificationRead tags: [notifications] summary: Mark a notification as read security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string responses: "200": description: Marked read content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /v1/notifications/read-all: put: operationId: markAllNotificationsRead tags: [notifications] summary: Mark all notifications as read security: - bearerAuth: [] responses: "200": description: All marked read content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /v1/notifications/push-token: post: operationId: registerPushToken tags: [notifications] summary: Register push notification token security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: token: type: string platform: type: string enum: [ios, android, web] required: [token, platform] responses: "200": description: Token registered content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── SAVED ITEMS ─────────────────────────────────────────── /v1/saved: get: operationId: listSavedItems tags: [saved] summary: Get all saved items for the current user security: - bearerAuth: [] parameters: - name: type in: query schema: type: string enum: [room, ride, job, event, post, immigration_resource] responses: "200": description: Saved items content: application/json: schema: $ref: "#/components/schemas/SavedItemsResponse" /v1/saved/{type}/{itemId}: post: operationId: saveItem tags: [saved] summary: Save an item security: - bearerAuth: [] parameters: - name: type in: path required: true schema: type: string enum: [room, ride, job, event, post, immigration_resource] - name: itemId in: path required: true schema: type: string responses: "200": description: Saved content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: unsaveItem tags: [saved] summary: Remove a saved item security: - bearerAuth: [] parameters: - name: type in: path required: true schema: type: string enum: [room, ride, job, event, post, immigration_resource] - name: itemId in: path required: true schema: type: string responses: "200": description: Unsaved content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── REPORTS ─────────────────────────────────────────────── /v1/reports: post: operationId: submitReport tags: [reports] summary: Submit a content or user report security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateReportRequest" responses: "201": description: Report submitted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" # ── ADMIN ───────────────────────────────────────────────── /v1/admin/stats: get: operationId: getAdminStats tags: [admin] summary: Get admin dashboard stats security: - bearerAuth: [] responses: "200": description: Stats content: application/json: schema: $ref: "#/components/schemas/AdminStats" /v1/admin/reports: get: operationId: listAdminReports tags: [admin] summary: List reports for moderation security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: status in: query schema: type: string enum: [pending, reviewed, resolved, dismissed] - name: type in: query schema: type: string responses: "200": description: Reports content: application/json: schema: $ref: "#/components/schemas/AdminReportPage" /v1/admin/reports/{id}: put: operationId: resolveAdminReport tags: [admin] summary: Resolve a report security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: action: type: string enum: [dismiss, warn, remove_content, suspend_user, ban_user] notes: type: string required: [action] responses: "200": description: Report resolved content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /v1/admin/users: get: operationId: listAdminUsers tags: [admin] summary: List users for admin management security: - bearerAuth: [] parameters: - name: page in: query schema: type: integer default: 0 - name: size in: query schema: type: integer default: 20 - name: search in: query schema: type: string - name: status in: query schema: type: string enum: [active, suspended, banned] responses: "200": description: Users content: application/json: schema: $ref: "#/components/schemas/AdminUserPage" /v1/admin/users/{id}/status: put: operationId: updateUserStatus tags: [admin] summary: Update a user's account status security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: status: type: string enum: [active, suspended, banned] reason: type: string required: [status] responses: "200": description: Status updated content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT responses: Unauthorized: description: Authentication required content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" NotFound: description: Resource not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" schemas: HealthStatus: type: object properties: status: type: string required: [status] SuccessResponse: type: object properties: success: type: boolean required: [success] ErrorResponse: type: object properties: timestamp: type: string format: date-time status: type: integer code: type: string message: type: string path: type: string fieldErrors: type: object additionalProperties: type: string traceId: type: string required: [timestamp, status, code, message] # ── PAGINATION ─────────────────────────────────────────── PaginationMeta: type: object properties: page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [page, size, totalItems, totalPages, hasNext] # ── USER / PROFILE ─────────────────────────────────────── UserProfile: type: object properties: id: type: string email: type: string displayName: type: string avatarUrl: type: string nullable: true bio: type: string nullable: true city: type: string nullable: true state: type: string nullable: true languages: type: array items: type: string occupation: type: string nullable: true userType: type: string enum: [student, professional, family, newcomer] nullable: true university: type: string nullable: true employer: type: string nullable: true interests: type: array items: type: string onboardingComplete: type: boolean emailVerified: type: boolean phoneVerified: type: boolean profileCompletionScore: type: integer role: type: string enum: [user, moderator, admin] createdAt: type: string format: date-time required: - id - email - displayName - languages - interests - onboardingComplete - emailVerified - phoneVerified - profileCompletionScore - role - createdAt PublicUserProfile: type: object properties: id: type: string displayName: type: string avatarUrl: type: string nullable: true bio: type: string nullable: true city: type: string nullable: true state: type: string nullable: true languages: type: array items: type: string occupation: type: string nullable: true userType: type: string nullable: true interests: type: array items: type: string profileCompletionScore: type: integer emailVerified: type: boolean role: type: string enum: [user, moderator, admin] createdAt: type: string format: date-time required: - id - displayName - languages - interests - profileCompletionScore - emailVerified - role - createdAt UpdateProfileRequest: type: object properties: displayName: type: string bio: type: string city: type: string state: type: string languages: type: array items: type: string occupation: type: string userType: type: string enum: [student, professional, family, newcomer] university: type: string employer: type: string interests: type: array items: type: string avatarUrl: type: string OnboardingRequest: type: object properties: displayName: type: string city: type: string state: type: string languages: type: array items: type: string occupation: type: string userType: type: string enum: [student, professional, family, newcomer] university: type: string employer: type: string interests: type: array items: type: string avatarUrl: type: string required: [displayName, languages] # ── HOME FEED ──────────────────────────────────────────── HomeFeed: type: object properties: featuredRooms: type: array items: $ref: "#/components/schemas/RoomListing" upcomingRides: type: array items: $ref: "#/components/schemas/Ride" popularPosts: type: array items: $ref: "#/components/schemas/Post" featuredJobs: type: array items: $ref: "#/components/schemas/Job" upcomingEvents: type: array items: $ref: "#/components/schemas/Event" recentConversations: type: array items: $ref: "#/components/schemas/Conversation" unreadNotificationCount: type: integer required: - featuredRooms - upcomingRides - popularPosts - featuredJobs - upcomingEvents - recentConversations - unreadNotificationCount # ── ROOMS ──────────────────────────────────────────────── RoomListing: type: object properties: id: type: string title: type: string description: type: string rentCents: type: integer depositCents: type: integer nullable: true city: type: string state: type: string zipCode: type: string nullable: true roomType: type: string enum: [private_room, shared_room, entire_unit, studio] propertyType: type: string enum: [apartment, house, condo, townhouse] furnished: type: string enum: [furnished, unfurnished, partial] availableDate: type: string format: date leaseDuration: type: string nullable: true utilitiesIncluded: type: boolean amenities: type: array items: type: string parking: type: boolean petFriendly: type: boolean smokingAllowed: type: boolean maxOccupants: type: integer nullable: true images: type: array items: type: string status: type: string enum: [active, paused, rented, deleted] posterProfile: $ref: "#/components/schemas/PublicUserProfile" isSaved: type: boolean createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - title - description - rentCents - city - state - roomType - propertyType - furnished - availableDate - utilitiesIncluded - amenities - parking - petFriendly - smokingAllowed - images - status - posterProfile - isSaved - createdAt - updatedAt CreateRoomRequest: type: object properties: title: type: string description: type: string rentCents: type: integer depositCents: type: integer city: type: string state: type: string zipCode: type: string roomType: type: string enum: [private_room, shared_room, entire_unit, studio] propertyType: type: string enum: [apartment, house, condo, townhouse] furnished: type: string enum: [furnished, unfurnished, partial] availableDate: type: string format: date leaseDuration: type: string utilitiesIncluded: type: boolean amenities: type: array items: type: string parking: type: boolean petFriendly: type: boolean smokingAllowed: type: boolean maxOccupants: type: integer images: type: array items: type: string required: - title - description - rentCents - city - state - roomType - propertyType - furnished - availableDate RoomListingPage: type: object properties: items: type: array items: $ref: "#/components/schemas/RoomListing" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── RIDES ──────────────────────────────────────────────── RideStatus: type: string enum: [draft, published, full, in_progress, completed, cancelled] Ride: type: object properties: id: type: string origin: type: string destination: type: string stops: type: array items: type: string departureDate: type: string format: date departureTime: type: string timeFlexibilityMinutes: type: integer nullable: true totalSeats: type: integer availableSeats: type: integer suggestedContributionCents: type: integer nullable: true recurring: type: boolean recurringDays: type: array items: type: string luggageInfo: type: string nullable: true notes: type: string nullable: true status: $ref: "#/components/schemas/RideStatus" driverProfile: $ref: "#/components/schemas/PublicUserProfile" requestCount: type: integer isSaved: type: boolean createdAt: type: string format: date-time required: - id - origin - destination - stops - departureDate - departureTime - totalSeats - availableSeats - recurring - recurringDays - status - driverProfile - requestCount - isSaved - createdAt CreateRideRequest: type: object properties: origin: type: string destination: type: string stops: type: array items: type: string departureDate: type: string format: date departureTime: type: string timeFlexibilityMinutes: type: integer totalSeats: type: integer suggestedContributionCents: type: integer recurring: type: boolean recurringDays: type: array items: type: string luggageInfo: type: string notes: type: string required: [origin, destination, departureDate, departureTime, totalSeats] RideRequest: type: object properties: id: type: string rideId: type: string riderProfile: $ref: "#/components/schemas/PublicUserProfile" seats: type: integer message: type: string nullable: true status: type: string enum: [pending, approved, rejected, cancelled] createdAt: type: string format: date-time required: - id - rideId - riderProfile - seats - status - createdAt RidePage: type: object properties: items: type: array items: $ref: "#/components/schemas/Ride" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── COMMUNITY ──────────────────────────────────────────── Community: type: object properties: id: type: string name: type: string description: type: string category: type: string icon: type: string nullable: true memberCount: type: integer postCount: type: integer isMember: type: boolean createdAt: type: string format: date-time required: - id - name - description - category - memberCount - postCount - isMember - createdAt Post: type: object properties: id: type: string communityId: type: string communityName: type: string title: type: string content: type: string tags: type: array items: type: string authorProfile: $ref: "#/components/schemas/PublicUserProfile" reactionCounts: type: object additionalProperties: type: integer commentCount: type: integer isPinned: type: boolean isSaved: type: boolean userReaction: type: string nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - communityId - communityName - title - content - tags - authorProfile - reactionCounts - commentCount - isPinned - isSaved - createdAt - updatedAt CreatePostRequest: type: object properties: communityId: type: string title: type: string content: type: string tags: type: array items: type: string required: [communityId, title, content] Comment: type: object properties: id: type: string postId: type: string content: type: string authorProfile: $ref: "#/components/schemas/PublicUserProfile" parentCommentId: type: string nullable: true replies: type: array items: $ref: "#/components/schemas/Comment" reactionCounts: type: object additionalProperties: type: integer createdAt: type: string format: date-time required: - id - postId - content - authorProfile - replies - reactionCounts - createdAt PostWithComments: type: object properties: post: $ref: "#/components/schemas/Post" comments: type: array items: $ref: "#/components/schemas/Comment" required: [post, comments] PostPage: type: object properties: items: type: array items: $ref: "#/components/schemas/Post" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── CHAT ──────────────────────────────────────────────── Conversation: type: object properties: id: type: string name: type: string nullable: true isGroup: type: boolean participants: type: array items: $ref: "#/components/schemas/PublicUserProfile" lastMessage: $ref: "#/components/schemas/Message" nullable: true unreadCount: type: integer createdAt: type: string format: date-time required: - id - isGroup - participants - unreadCount - createdAt Message: type: object properties: id: type: string conversationId: type: string content: type: string attachmentUrl: type: string nullable: true attachmentType: type: string enum: [image, file] nullable: true senderProfile: $ref: "#/components/schemas/PublicUserProfile" replyToMessageId: type: string nullable: true readBy: type: array items: type: string isEdited: type: boolean isDeleted: type: boolean createdAt: type: string format: date-time required: - id - conversationId - content - senderProfile - readBy - isEdited - isDeleted - createdAt SendMessageRequest: type: object properties: content: type: string attachmentUrl: type: string attachmentType: type: string enum: [image, file] replyToMessageId: type: string required: [content] # ── JOBS ───────────────────────────────────────────────── Job: type: object properties: id: type: string title: type: string company: type: string location: type: string nullable: true workType: type: string enum: [remote, hybrid, onsite] nullable: true employmentType: type: string enum: [full_time, part_time, contract, internship] nullable: true experienceLevel: type: string enum: [entry, mid, senior, lead, executive] nullable: true salaryMin: type: integer nullable: true salaryMax: type: integer nullable: true salaryCurrency: type: string nullable: true skills: type: array items: type: string sponsorshipAvailable: type: boolean nullable: true description: type: string applicationUrl: type: string nullable: true source: type: string enum: [community, company, feed] posterProfile: $ref: "#/components/schemas/PublicUserProfile" nullable: true isSaved: type: boolean expiresAt: type: string format: date-time nullable: true postedAt: type: string format: date-time required: - id - title - company - skills - description - source - isSaved - postedAt CreateJobRequest: type: object properties: title: type: string company: type: string location: type: string workType: type: string enum: [remote, hybrid, onsite] employmentType: type: string enum: [full_time, part_time, contract, internship] experienceLevel: type: string enum: [entry, mid, senior, lead, executive] salaryMin: type: integer salaryMax: type: integer salaryCurrency: type: string skills: type: array items: type: string sponsorshipAvailable: type: boolean description: type: string applicationUrl: type: string expiresAt: type: string format: date-time required: [title, company, description] JobPage: type: object properties: items: type: array items: $ref: "#/components/schemas/Job" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── IMMIGRATION ────────────────────────────────────────── ImmigrationCategory: type: object properties: id: type: string name: type: string description: type: string icon: type: string resourceCount: type: integer required: [id, name, description, icon, resourceCount] ImmigrationResource: type: object properties: id: type: string categoryId: type: string categoryName: type: string title: type: string summary: type: string content: type: string type: type: string enum: [guide, checklist, faq, article] tags: type: array items: type: string sourceUrl: type: string nullable: true sourceLabel: type: string nullable: true isTrustedContributor: type: boolean lastReviewedAt: type: string format: date-time isSaved: type: boolean createdAt: type: string format: date-time required: - id - categoryId - categoryName - title - summary - content - type - tags - isTrustedContributor - lastReviewedAt - isSaved - createdAt ImmigrationResourcePage: type: object properties: items: type: array items: $ref: "#/components/schemas/ImmigrationResource" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── EXPENSES ───────────────────────────────────────────── ExpenseGroup: type: object properties: id: type: string name: type: string description: type: string nullable: true members: type: array items: $ref: "#/components/schemas/PublicUserProfile" totalExpensesCents: type: integer myBalanceCents: type: integer createdAt: type: string format: date-time required: - id - name - members - totalExpensesCents - myBalanceCents - createdAt Balance: type: object properties: fromUserId: type: string fromDisplayName: type: string toUserId: type: string toDisplayName: type: string amountCents: type: integer required: - fromUserId - fromDisplayName - toUserId - toDisplayName - amountCents ExpenseGroupDetail: type: object properties: group: $ref: "#/components/schemas/ExpenseGroup" balances: type: array items: $ref: "#/components/schemas/Balance" required: [group, balances] Expense: type: object properties: id: type: string groupId: type: string description: type: string totalAmountCents: type: integer splitType: type: string enum: [equal, exact, percentage, shares] paidByProfile: $ref: "#/components/schemas/PublicUserProfile" splits: type: array items: $ref: "#/components/schemas/ExpenseSplit" receiptUrl: type: string nullable: true notes: type: string nullable: true date: type: string format: date createdAt: type: string format: date-time required: - id - groupId - description - totalAmountCents - splitType - paidByProfile - splits - date - createdAt ExpenseSplit: type: object properties: userId: type: string displayName: type: string amountCents: type: integer percentage: type: number nullable: true shares: type: integer nullable: true required: [userId, displayName, amountCents] CreateExpenseRequest: type: object properties: description: type: string totalAmountCents: type: integer splitType: type: string enum: [equal, exact, percentage, shares] paidByUserId: type: string splits: type: array items: type: object properties: userId: type: string amountCents: type: integer percentage: type: number shares: type: integer required: [userId] receiptUrl: type: string notes: type: string date: type: string format: date required: [description, totalAmountCents, splitType, paidByUserId, splits, date] Settlement: type: object properties: id: type: string groupId: type: string fromUserId: type: string toUserId: type: string amountCents: type: integer note: type: string nullable: true createdAt: type: string format: date-time required: [id, groupId, fromUserId, toUserId, amountCents, createdAt] # ── EVENTS ─────────────────────────────────────────────── Event: type: object properties: id: type: string title: type: string description: type: string isOnline: type: boolean venueAddress: type: string nullable: true onlineLink: type: string nullable: true city: type: string nullable: true state: type: string nullable: true startAt: type: string format: date-time endAt: type: string format: date-time nullable: true capacity: type: integer nullable: true rsvpCount: type: integer waitlistCount: type: integer userRsvpStatus: type: string enum: [going, maybe, not_going, waitlisted] nullable: true organizerProfile: $ref: "#/components/schemas/PublicUserProfile" coverImageUrl: type: string nullable: true tags: type: array items: type: string status: type: string enum: [published, cancelled] isSaved: type: boolean createdAt: type: string format: date-time required: - id - title - description - isOnline - startAt - rsvpCount - waitlistCount - organizerProfile - tags - status - isSaved - createdAt CreateEventRequest: type: object properties: title: type: string description: type: string isOnline: type: boolean venueAddress: type: string onlineLink: type: string city: type: string state: type: string startAt: type: string format: date-time endAt: type: string format: date-time capacity: type: integer coverImageUrl: type: string tags: type: array items: type: string required: [title, description, isOnline, startAt] EventPage: type: object properties: items: type: array items: $ref: "#/components/schemas/Event" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── NOTIFICATIONS ──────────────────────────────────────── AppNotification: type: object properties: id: type: string type: type: string enum: - new_message - ride_request - ride_request_approved - ride_request_rejected - ride_reminder - listing_inquiry - post_reply - comment_reply - event_reminder - expense_added - settlement_recorded - moderation_action - security_alert title: type: string body: type: string deepLink: type: string nullable: true isRead: type: boolean metadata: type: object additionalProperties: true createdAt: type: string format: date-time required: - id - type - title - body - isRead - createdAt NotificationPage: type: object properties: items: type: array items: $ref: "#/components/schemas/AppNotification" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] # ── SAVED ITEMS ────────────────────────────────────────── SavedItemsResponse: type: object properties: rooms: type: array items: $ref: "#/components/schemas/RoomListing" rides: type: array items: $ref: "#/components/schemas/Ride" jobs: type: array items: $ref: "#/components/schemas/Job" events: type: array items: $ref: "#/components/schemas/Event" posts: type: array items: $ref: "#/components/schemas/Post" immigrationResources: type: array items: $ref: "#/components/schemas/ImmigrationResource" required: [rooms, rides, jobs, events, posts, immigrationResources] # ── REPORTS ────────────────────────────────────────────── CreateReportRequest: type: object properties: targetType: type: string enum: [user, room, ride, post, comment, message, job, event] targetId: type: string reason: type: string enum: - spam - harassment - misinformation - scam - inappropriate_content - other details: type: string required: [targetType, targetId, reason] # ── ADMIN ──────────────────────────────────────────────── AdminStats: type: object properties: totalUsers: type: integer newUsersToday: type: integer activeRooms: type: integer activeRides: type: integer totalPosts: type: integer pendingReports: type: integer totalEvents: type: integer required: - totalUsers - newUsersToday - activeRooms - activeRides - totalPosts - pendingReports - totalEvents AdminReport: type: object properties: id: type: string targetType: type: string targetId: type: string reason: type: string details: type: string nullable: true status: type: string enum: [pending, reviewed, resolved, dismissed] reporterProfile: $ref: "#/components/schemas/PublicUserProfile" moderatorNotes: type: string nullable: true createdAt: type: string format: date-time resolvedAt: type: string format: date-time nullable: true required: - id - targetType - targetId - reason - status - reporterProfile - createdAt AdminReportPage: type: object properties: items: type: array items: $ref: "#/components/schemas/AdminReport" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext] AdminUser: type: object properties: id: type: string email: type: string displayName: type: string avatarUrl: type: string nullable: true role: type: string enum: [user, moderator, admin] status: type: string enum: [active, suspended, banned] onboardingComplete: type: boolean emailVerified: type: boolean createdAt: type: string format: date-time lastActiveAt: type: string format: date-time nullable: true required: - id - email - displayName - role - status - onboardingComplete - emailVerified - createdAt AdminUserPage: type: object properties: items: type: array items: $ref: "#/components/schemas/AdminUser" page: type: integer size: type: integer totalItems: type: integer totalPages: type: integer hasNext: type: boolean required: [items, page, size, totalItems, totalPages, hasNext]