# API Documentation

## Module: Analytics

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/me/channel` | Get My Channel Analytics |
| **GET** | `/me/dashboard` | Get My Creator Dashboard |
| **GET** | `/me/videos` | Get My Videos Analytics |
| **GET** | `/me/videos/top` | Get My Top Performing Videos |
| **GET** | `/me/videos/:videoId` | Get My Video Analytics |

## Module: Auth

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/signup` | Signup |
| **POST** | `/login` | Login |
| **POST** | `/forgot-password` | Forgot Password |
| **POST** | `/reset-password` | Reset Password |
| **POST** | `/logout` | Logout |
| **POST** | `/refresh-token` | Refresh Token |

## Module: Chats

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/start/:userId` | Start Private Conversation |
| **GET** | `/` | Get My Conversations |
| **GET** | `/archived` | Get Archived Conversations |
| **GET** | `/presence/:userId` | Get User Last Seen |
| **GET** | `/:conversationId` | Get Conversation Details |
| **GET** | `/:conversationId/messages` | Get Conversation Messages |
| **POST** | `/:conversationId/message` | Array |
| **PUT** | `/:conversationId/read` | Mark Conversation As Read |
| **PUT** | `/:conversationId/archive` | Archive Conversation |
| **PUT** | `/:conversationId/unarchive` | Unarchive Conversation |
| **PUT** | `/:conversationId/mute` | Mute Conversation |
| **PUT** | `/:conversationId/unmute` | Unmute Conversation |
| **PUT** | `/message/:messageId` | Edit Message |
| **DELETE** | `/message/:messageId` | Delete Message |

## Module: Comments

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/:postId` | Create Comment |
| **GET** | `/:postId` | Get Comments |
| **PUT** | `/:commentId` | Update Comment |
| **DELETE** | `/:commentId` | Delete Comment |
| **POST** | `/:commentId/react` | React To Comment |
| **DELETE** | `/:commentId/react` | Remove Comment Reaction |

## Module: Events

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/categories` | Get All Categories |
| **POST** | `/` | Single |
| **GET** | `/my` | Get My Events |
| **GET** | `/` | Get Events |
| **GET** | `/:id` | Get Event Details |
| **POST** | `/:id/rsvp` | Rsvp Event |
| **GET** | `/:id/participants` | Get Participants |
| **DELETE** | `/:id` | Delete Event |
| **PATCH** | `/:id` | Single |
| **POST** | `/:eventId/react` | React To Event |
| **DELETE** | `/:eventId/react` | Remove Event Reaction |
| **POST** | `/:eventId/comment` | Create Event Comment |
| **GET** | `/:eventId/comment` | Get Event Comments |

## Module: Friend

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/suggestions` | Get Suggestions |
| **POST** | `/request/:userId` | Send Friend Request |
| **DELETE** | `/request/:userId` | Cancel Friend Request |
| **PUT** | `/accept/:userId` | Accept Friend Request |
| **PUT** | `/reject/:userId` | Reject Friend Request |
| **GET** | `/requests/received` | Get Received Requests |
| **GET** | `/requests/sent` | Get Sent Requests |
| **GET** | `/status/:userId` | Get Friendship Status |
| **GET** | `/` | Get My Friends |
| **DELETE** | `/:userId` | Unfriend |

## Module: GoogleAds

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/units/active` | Get Active Ad Units For Screen |
| **POST** | `/admin/units` | Create Ad Unit |
| **GET** | `/admin/units` | Get Ad Units |
| **PUT** | `/admin/units/:adUnitId` | Update Ad Unit |
| **PATCH** | `/admin/units/:adUnitId/status` | Toggle Ad Unit Status |
| **POST** | `/serves` | Log Ad Serve |
| **POST** | `/events` | Log Ad Event |
| **POST** | `/admin/revenue-reports` | Import Google Ad Revenue Report |
| **GET** | `/admin/revenue-reports` | Get Google Ad Revenue Reports |
| **POST** | `/admin/revenue-reports/distribute` | Distribute Google Ad Revenue Reports |

## Module: Groups

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/categories` | Get Categories |
| **POST** | `/add` | Single |
| **GET** | `/my` | Get My Groups |
| **PUT** | `/:groupId` | Single |
| **DELETE** | `/:groupId` | Delete Group |
| **GET** | `/` | Get Groups |
| **POST** | `/:groupId/join` | Join Group |
| **POST** | `/:groupId/leave` | Leave Group |
| **GET** | `/:groupId/members` | Get Members |
| **PUT** | `/:groupId/approve/:userId` | Approve Member |
| **DELETE** | `/:groupId/members/:userId/reject` | Reject Member |
| **DELETE** | `/:groupId/members/:userId` | Remove Member |
| **GET** | `/:groupId/pending` | Get Pending Requests |
| **POST** | `/:groupId/posts` | Array |
| **GET** | `/:groupId/posts` | Get Group Posts |
| **GET** | `/:groupId/posts/:postId` | Get Single Group Post |
| **PUT** | `/:groupId/posts/:postId` | Array |
| **DELETE** | `/:groupId/posts/:postId` | Delete Group Post |
| **GET** | `/:groupId` | Get Single Group |

## Module: Jobs

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/meta` | Get Job Metadata |
| **GET** | `/applications/meta` | Get Application Enums |
| **POST** | `/` | Create User Job |
| **GET** | `/my/jobs` | Get My Jobs |
| **GET** | `/my/applications` | Get My Applications |
| **GET** | `/my/saved` | Get My Saved Jobs |
| **GET** | `/` | Get Jobs |
| **PATCH** | `/:jobId/status` | Update User Job Status |
| **POST** | `/:jobId/apply` | Apply To Job |
| **DELETE** | `/:jobId/apply` | Withdraw Application |
| **POST** | `/:jobId/save` | Save Job |
| **DELETE** | `/:jobId/save` | Unsave Job |
| **GET** | `/:jobId/applications/:applicantId` | Get Applicant Details |
| **GET** | `/:jobId/applicants` | Get Job Applicants |
| **PATCH** | `/:jobId/applications/:applicationId/status` | Update Application Status |
| **GET** | `/:jobId` | Get Job By Id |
| **PUT** | `/:jobId` | Update User Job |
| **DELETE** | `/:jobId` | Delete User Job |

## Module: MarketPlace

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/` | Create Address |
| **GET** | `/` | Get My Addresses |
| **GET** | `/:addressId` | Get Address By Id |
| **PUT** | `/:addressId` | Update Address |
| **DELETE** | `/:addressId` | Delete Address |
| **PUT** | `/:addressId/default` | Set Default Address |

## Module: MarketPlace

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/` | Get Cart |
| **GET** | `/count` | Get Cart Count |
| **POST** | `/:productId` | Add To Cart |
| **PUT** | `/:productId` | Update Cart Item |
| **DELETE** | `/:productId` | Remove From Cart |
| **DELETE** | `/` | Clear Cart |

## Module: MarketPlace

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/create` | Create Order |
| **GET** | `/` | Get My Orders |
| **GET** | `/:orderId` | Get Order Details |
| **PUT** | `/:orderId/cancel` | Cancel Order |
| **PUT** | `/:orderId/deliver` | Mark Delivered |

## Module: MarketPlace

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/categories` | Get All Categories |
| **GET** | `/category/:categoryId` | Get Product By Category |
| **POST** | `/products/create` | Array |
| **GET** | `/products` | Get All Products |
| **GET** | `/products/:productId` | Get Product By Id |
| **GET** | `/my-products` | Get My Products |
| **PUT** | `/products/:productId` | Array |
| **DELETE** | `/products/:productId` | Delete Product |

## Module: MarketPlace

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/:productId` | Create Review |
| **GET** | `/product/:productId` | Get Product Reviews |
| **PUT** | `/edit/:reviewId` | Update Review |
| **DELETE** | `/delete/:reviewId` | Delete Review |
| **POST** | `/:reviewId/reply` | Create Reply |
| **PUT** | `/reply/:replyId` | Update Reply |
| **DELETE** | `/reply/:replyId` | Delete Reply |
| **POST** | `/:reviewId/react` | React To Review |
| **POST** | `/reply/:replyId/react` | React To Reply |

## Module: MarketPlace

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/status/:productId` | Is Wishlisted |
| **POST** | `/:productId` | Toggle Wishlist |
| **DELETE** | `/:productId` | Remove From Wishlist |
| **GET** | `/` | Get Wishlist |

## Module: Memories

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/` | Get Memories Dashboard |
| **GET** | `/year/:yearsAgo` | Get Memories By Years Ago |

## Module: Monetizations

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/seller/wallet-summary` | Get Seller Wallet Summary |
| **GET** | `/seller/transactions` | Get Seller Transaction History |
| **GET** | `/seller/order-wise-earnings` | Get Seller Order Wise Earnings |
| **GET** | `/seller/weekly-payout-preview` | Get Seller Weekly Payout Preview |
| **GET** | `/admin/platform-revenue-summary` | Get Platform Revenue Summary |
| **GET** | `/admin/seller-payout-queue` | Get Seller Payout Queue |
| **GET** | `/admin/refund-adjustments` | Get Refund Adjustments |
| **POST** | `/admin/payouts/process` | Process Seller Payout Batch |
| **GET** | `/seller/payout-history` | Get Seller Payout History |
| **GET** | `/admin/payout-batches` | Get Admin Payout Batch History |
| **GET** | `/admin/payout-batches/:batchId` | Get Admin Payout Batch Details |

## Module: Notification

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/` | Get Notifications |
| **GET** | `/unread-count` | Get Unread Count |
| **PATCH** | `/read-all` | Mark All As Read |
| **PATCH** | `/:id/read` | Mark As Read |
| **POST** | `/fcm-token` | Save Fcm Token |
| **DELETE** | `/fcm-token` | Remove Fcm Token |

## Module: Pages

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/categories` | Get Page Categories |
| **GET** | `/categories/:categoryId/pages` | Get Pages By Category |
| **POST** | `/` | Fields |
| **GET** | `/` | Get Pages |
| **GET** | `/:id` | Get Single Page |
| **PUT** | `/:id` | Fields |
| **DELETE** | `/:id` | Delete Page |
| **POST** | `/:id/follow` | Follow Page |
| **DELETE** | `/:id/unfollow` | Unfollow Page |
| **GET** | `/:id/followers` | Get Page Followers |
| **GET** | `/users/:userId/following-pages` | Get User Following Pages |
| **POST** | `/:pageId/posts` | Array |
| **GET** | `/:pageId/posts` | Get Page Posts |
| **GET** | `/:pageId/posts/:postId` | Get Single Page Post |
| **PUT** | `/:pageId/posts/:postId` | Array |
| **DELETE** | `/:pageId/posts/:postId` | Delete Page Post |
| **POST** | `/:pageId/jobs` | Create Page Job |
| **GET** | `/:pageId/jobs` | Get Page Jobs |

## Module: Payment

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/create-order` | Create Razorpay Order |
| **POST** | `/verify` | Verify Payment |

## Module: PayoutAccounts

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/` | Create Payout Account |
| **GET** | `/` | Get My Payout Accounts |
| **PATCH** | `/:accountId/default` | Set Default Account |
| **PUT** | `/:accountId` | Update Payout Account |
| **DELETE** | `/:accountId` | Delete Payout Account |

## Module: Posts

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/create` | Array |
| **GET** | `/all` | Get All Posts |
| **GET** | `/saved` | Get Saved Posts |
| **GET** | `/:postId` | Get Post By Id |
| **PUT** | `/:postId` | Array |
| **DELETE** | `/:postId` | Delete Post |
| **POST** | `/:postId/save` | Save Post |
| **DELETE** | `/:postId/save` | Unsave Post |
| **POST** | `/:postId/react` | React To Post |
| **DELETE** | `/:postId/react` | Remove Post Reaction |
| **POST** | `/:postId/comments` | Create Post Comment |
| **GET** | `/:postId/comments` | Get Post Comments |
| **POST** | `/recalculate-post-scores` | Recalculate Post Scores |

## Module: Reactions

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/:entityType/:entityId` | React |
| **DELETE** | `/:entityType/:entityId` | Remove Reaction |
| **GET** | `/:entityType/:entityId/count` | Get Reaction Counts |
| **GET** | `/:entityType/:entityId/user` | Get User Reaction |

## Module: Reels

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/create` | Fields |
| **GET** | `/` | Get All Reels |
| **GET** | `/my` | Get My Reels |
| **GET** | `/:userId/reels` | Get User Reels |
| **GET** | `/saved` | Get Saved Reels |
| **POST** | `/:reelId/save` | Save Reel |
| **DELETE** | `/:reelId/save` | Unsave Reel |
| **POST** | `/:reelId/react` | React To Reel |
| **POST** | `/:reelId/comments` | Add Comment To Reel |
| **GET** | `/:reelId/comments` | Get Reel Comments |
| **GET** | `/:reelId` | Get Single Reel |
| **PUT** | `/:reelId` | Fields |
| **DELETE** | `/:reelId` | Delete Reel |
| **POST** | `/calculate-scores` | Calculate Reel Scores |

## Module: Search

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/` | Search |

## Module: Shares

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/` | Create Share |
| **GET** | `/:entityType/:entityId` | Get Share Preview |
| **POST** | `/chat` | Share To Conversation |

## Module: Stories

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/` | Single |
| **GET** | `/feed` | Get Stories Feed |
| **GET** | `/me` | Get My Stories |
| **GET** | `/user/:userId` | Get User Stories |
| **POST** | `/:storyId/view` | View Story |
| **GET** | `/:storyId/viewers` | Get Story Viewers |
| **DELETE** | `/:storyId` | Delete Story |
| **POST** | `/:storyId/react` | React To Story |
| **GET** | `/music` | Get Music Library |
| **GET** | `/music/:musicId` | Get Music By Id |

## Module: User

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/profile` | Get Profile |
| **PUT** | `/profile` | Fields |
| **GET** | `/me/liked-posts` | Get Liked Posts |
| **GET** | `/me/saved-posts` | Get Saved Posts |
| **GET** | `/all` | Get All Users |
| **GET** | `/:id/activity` | Get User Activity |
| **GET** | `/:id` | Get User Profile |
| **POST** | `/profile/posts` | Array |
| **GET** | `/:userId/posts` | Get Profile Posts |
| **GET** | `/:userId/posts/:postId` | Get Single Profile Post |
| **PUT** | `/profile/posts/:postId` | Array |
| **DELETE** | `/profile/posts/:postId` | Delete Profile Post |

## Module: Video

| Method | Endpoint | Purpose |
|---|---|---|
| **GET** | `/categories` | Get All Categories |
| **GET** | `/` | Get All Public Videos |
| **GET** | `/search` | Search Videos |
| **GET** | `/trending` | Get Trending Videos |
| **GET** | `/latest` | Get Latest Videos |
| **GET** | `/category/:categoryId` | Get Videos By Category |
| **GET** | `/me/videos` | Get My Videos |
| **GET** | `/me/saved` | Get Saved Videos |
| **GET** | `/me/subscriptions` | Get My Subscriptions |
| **GET** | `/me/history` | Get Watch History |
| **GET** | `/creator/:creatorId` | Get Creator Videos |
| **POST** | `/creator/:creatorId/subscribe` | Subscribe To Creator |
| **DELETE** | `/creator/:creatorId/subscribe` | Unsubscribe From Creator |
| **POST** | `/` | Fields |
| **GET** | `/:videoId/related` | Get Related Videos |
| **POST** | `/:videoId/view` | Add View |
| **POST** | `/:videoId/save` | Save Video |
| **DELETE** | `/:videoId/save` | Unsave Video |
| **POST** | `/:videoId/report` | Report Video |
| **POST** | `/:videoId/history` | Update Watch History |
| **POST** | `/:videoId/react` | React To Video |
| **DELETE** | `/:videoId/react` | Remove Video Reaction |
| **GET** | `/:videoId/reaction-counts` | Get Video Reaction Counts |
| **GET** | `/:videoId/my-reaction` | Get My Video Reaction |
| **POST** | `/:videoId/comments` | Create Video Comment |
| **GET** | `/:videoId/comments` | Get Video Comments |
| **DELETE** | `/:videoId/comments/:commentId` | Delete Video Comment |
| **GET** | `/:videoId` | Get Video By Id |
| **PUT** | `/:videoId` | Fields |
| **DELETE** | `/:videoId` | Delete Video |

## Module: VideoMonetization

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/creator/check-eligibility` | Check Creator Eligibility |
| **POST** | `/creator/process-daily-earnings` | Process My Daily Video Earnings |
| **GET** | `/creator/summary` | Get Creator Video Monetization Summary |
| **GET** | `/creator/earnings-history` | Get Creator Video Earnings History |
| **GET** | `/creator/video-wise-earnings` | Get Creator Video Wise Earnings |
| **GET** | `/admin/creators` | Get Admin Video Monetization Creators |
| **GET** | `/admin/earnings-report` | Get Admin Video Earnings Report |
| **POST** | `/admin/release-earnings` | Release Video Earnings |
| **GET** | `/admin/settings` | Get Video Monetization Settings |
| **PUT** | `/admin/settings` | Update Video Monetization Settings |

## Module: Withdrawals

| Method | Endpoint | Purpose |
|---|---|---|
| **POST** | `/` | Create Withdrawal Request |
| **GET** | `/` | Get My Withdrawals |
| **GET** | `/:withdrawalId` | Get My Withdrawal Details |

