Skip to content

API Inventory

Total API endpoints: ~728 across 6 route files (exact per-file: routes/auth.js 291, routes/routes.js 394, routes/social.js 15, routes/paddle.js 2, routes/partnerAuth.js 4, dashboard/routes/index.js 22).

Route Files Summary

File Mount Auth Routes Pattern
routes/routes.js / 1 route uses methods.ensureToken; rest unauthenticated at route level ~393 Class-based apiRoutes.prototype.init()
routes/auth.js /auth/ ALL routes (router.use(auth)) ~272 Express Router
routes/social.js /social/ None (Passport OAuth) 15 Express Router
routes/paddle.js /paddle/ ALL routes (router.use(auth)) 2 Express Router
routes/partnerAuth.js /partnerAuth/ Custom JWT per-route 4 Express Router
dashboard/routes/index.js /auth router.use(auth) in dev only 22 Express Router

Standard Response Format

All endpoints return:

{ "status": boolean, "errorMsg": string, "response": object }


File 1: routes/routes.js (~393 routes, mounted at /)

Auth: Only GET / uses methods.ensureToken. 4 webhook routes use express.raw(). All other ~388 routes have no route-level auth middleware. Some handlers check res.userId/res.accountId or req.headers.userid internally.

Authentication & Registration

Method Path Description
GET / Validate token and return user data (uses ensureToken)
POST /register Register new user with email/password
POST /registerbyadmin Admin registers a user
POST /login Email/password login, returns encrypted JWT
POST /sociallogin Social OAuth login
POST /forgotpassword Send password reset email
POST /resetpassword Reset password with token
POST /changepassword Change password (requires current)
POST /verifymember Verify member email
POST /verifyemail Email verification
POST /checkEmailExist Check if email is registered
GET /getProvider:mId Get linked social providers for member
POST /addOrUpdateProvider Add or update social provider link
POST /inviteUser Send invitation email
POST /corpInviteUser Send corporate invitation
GET /resendInviteMail/:inviteId Resend invitation email
GET /resendCorpInviteMail/:inviteId Resend corporate invitation
GET /getPartner/:partnerName Get partner details by name

User Settings & Profile

Method Path Description
GET /getSetting:mId Get user settings
POST /addOrUpdateSetting Update user settings
GET /getUserdetail:mId Get user profile details
POST /addOrUpdateDetail Update user details
GET /getUserFeature:mId Get user feature flags
POST /addOrUpdateUserFeatures Update feature flags
GET /getCountries Get countries list
GET /getCities:cId Get cities by country
GET /getStates Get states list
GET /getLanguages Get active languages
GET /getToneOfVoice Get tone-of-voice options
GET /getFonts Get available fonts

Plans & Subscriptions

Method Path Description
GET /getPlans/:cId Get plans by country
GET /getexistingPlans/:cId Get user's existing plan
GET /getallPlans Get all plans
GET /getCoupons/:code Validate coupon code
GET /getSponsorId Get affiliate/sponsor ID
POST /addOrUpdateSubscriptions Create or update subscription

Payment Webhooks

Method Path Description
POST /stripe_webhooks Stripe webhook handler (express.raw())
POST /paddle_sandbox_webhooks Paddle sandbox webhook (express.raw())
POST /paddle_production_webhooks Paddle production webhook (express.raw())
POST /paddle_Admin_webhooks Paddle admin webhook (express.raw())
GET /paddlePay/:role/:transactionId Process Paddle payment
POST /paddlePay/update Update Paddle subscription

Media Upload & Management

Method Path Description
POST /uploadImage Upload profile/avatar image to S3
POST /uploadLogo Upload company logo to S3
POST /uploadFooter Upload footer image to S3
POST /uploadusermedia Upload user media with metadata
POST /uploadUserfontLibrary Upload custom font files
POST /uploadcusmedia Upload custom image/video
POST /uploadcusvideo Upload custom video
POST /uploadReelVideo Upload reel/short video
POST /uploadCsvFile Upload CSV and parse contacts
POST /userFileUploads Upload multiple files
POST /uploadMediaLibraryImage Upload to media library
POST /uploadLibraryFile Upload library file (PDF, etc.)
POST /reUploadMediaLibraryImage Replace media library image
POST /uploadProdutMedia Upload product media
POST /uploadCompanyLogo Upload company logo with industry classification
POST /editModalMediaUpload Upload media for modal editor
POST /addOrUpdateMedia Add/update media DB records
GET /getMedia:mId Get media for a member
POST /getcusmedia Get custom media
POST /getUsermedia Get user-uploaded media
POST /deletelogo Soft-delete company logo
POST /deletefooter Soft-delete footer image
Method Path Description
GET /getNonApproveMedia Get non-approved media items
GET /getMyNonApproveMedia:mId Get non-approved media for member
POST /updateImageTitle Update image title/metadata
POST /getDesignmedia Get design media for content planner
POST /geteditmedia Get media for editing
GET /getModalMedia:pId,:mId Get media for modal display
GET /geteditorMedia:pId Get media for editor
Method Path Description
POST /getpexelsimages Fetch images from Pexels API
POST /searchpexelsimages Search Pexels by keyword
POST /searchnewimages Search Unsplash images

S3 / File Operations

Method Path Description
GET /getS3Data/:s3Url/:type Get S3 file data (image or JSON)
GET /getS3SignedUrl Get signed URL for S3 object
GET /getRandomImage Get random image from media library

Content Library

Method Path Description
GET /getAllLibrary:pId,:member Get all library content for member
GET /getMyLibrary:mId,:pId Get user's personal library
GET /searchMyLibrary:mId,:searchText Search user's library
GET /searchAllLibrary:searchText,:lId,:category Search all library
GET /getRecommendedLibrary:pId,:lId,:mId,:category Get recommended library
GET /getCategoryLibrary Get library categories
GET /getSubjectLibrary Get library subjects
GET /getAdminLibrary:pId,:cId Admin library content
GET /gettempLibrary:member Get temp/draft library
POST /addOrUpdateLibrary Add/update library content
GET /getLibrary:pId Get library by ID

Feed / Post Scheduling

Method Path Description
POST /addOrUpdateFeed Add/update feed post
POST /updateFeedSchedule Update feed schedule
GET /getScheduledFeeds:mId Get scheduled feeds
GET /getFeeds:mId Get all feeds
GET /getMyScheduledDate:mId Get scheduled post dates
GET /getMyScheduledPosts:mId Get scheduled posts
GET /getMyPostsDate:mId Get posted dates
GET /getMyPosts:mId Get published posts
GET /getMyApprovalPosts:mId Get posts pending approval
GET /getMyListPosts:mId List view of posts
GET /startSchedulingPosts:mId Trigger scheduling job
POST /getUserScheduleCurrentPost Get currently scheduled post
POST /getUserScheduleNextPost Get next scheduled post
POST /updatePostTime Update scheduled post time
POST /userSchedulePost Schedule post with image processing
POST /userSavePost Save post draft
POST /deletefeed Soft-delete feed post
POST /deletecuspost Soft-delete custom post

AI Content Generation

Method Path Description
POST /generateContent Generate AI content using LLMs
POST /AISA AI sentiment analysis
POST /ai_image Generate AI image (DALL-E)
POST /Ai_quotes Generate AI quotes
POST /generateTweets Generate tweet content
POST /generatepov Generate point-of-view content
POST /generateQuestionContent Generate question-format content
POST /generateListContent Generate list-format content
POST /generatePostContent Generate social post content
POST /generateMoreContent Generate additional variations
POST /promptCheck Validate AI prompt and generate
GET /getGenerateContentStatus Check generation job status

Organization Profile / AI

Method Path Description
POST /classify-industry Classify business industry (Gemini)
POST /generate-organization-profile Generate org profile (SSE streaming)
POST /process-organization-profile Save generated org profile
POST /generate-topics-suggestion Generate topic suggestions
POST /generate-relevant-industries Generate relevant industries
POST /generate-chapter-profile Generate BNI chapter profile
POST /regenerate-org-profile Regenerate org profile
POST /RegenerateAiResults Regenerate AI content results

Chat Bot / AI Chat

Method Path Description
POST /chat-bot AI chatbot (Vertex AI with RAG)
POST /process_chat_history Save chat history
POST /api/profile/stream SSE streaming for profile generation
POST /chat/new Create new Gemini chat session
POST /chat/message Send message in chat (supports files)
DELETE /api/chat/:sessionId Delete chat session

Design / Templates

Method Path Description
POST /getUserDesignList Get user's designs with S3 images
GET /getTemplatesList Get all approved templates
POST /designUpload Upload design template
POST /getEditDesignList Get design for editing
POST /getUserTemplates Get user's custom templates
POST /addOrUpdateUserTemplates Add/update user template
POST /saveUserposts Save user post with design
POST /getDefaultBrandColor Get default brand colors
GET /getTemplatesById:pId Get template by ID
GET /getRecentTemplates Get 7 most recent templates
POST /getTemplate Get specific template with JSON
POST /getPostById Get post by ID
POST /savepostcontent Save to content planner
POST /getCarousalDesignList Get carousel designs
POST /getEditcarousalDesign Get carousel for editing

Post Management

Method Path Description
POST /duplicatepost Duplicate existing post
POST /archiveContentFolder Archive content folder
POST /bulkReelIdeasActions Bulk actions on reel ideas
POST /updatefavourite Toggle favourite status
POST /getpostdata Get post data by feed IDs

Analytics & Insights

Method Path Description
GET /getMyPostInsights:mId Get post insights
GET /getMyPostOverallInsights:mId Get overall insights
GET /getMyPostPlatformInsights:mId Get per-platform insights
POST /getMonthlyAccountInsights Get monthly account insights
GET /monthly-insights Get next pending monthly insights
GET /getBrandPositioning/:mId Get brand positioning

Industries, Categories & Subjects

Method Path Description
GET /getIndustries Get all industries
GET /getCategories Get all categories
POST /addupdateIndustries Add/update industries
POST /addupdateCategories Add/update categories
POST /addSubject Add subject with AI classification
POST /Searchsubject Search subjects
POST /addOrUpdateSelectedTopics Add/update selected topics
GET /getSuggestedTopics:mId Get AI-suggested topics

Members / Admin Lists

Method Path Description
GET /getAllMemberslist Get all members with subscription info
POST /searchAccountUser Search account users
POST /searchAllMembers Search all members
POST /searchUser Search users by text
GET /userlist:pId Get user list by partner
GET /userReview/:uid Get user review/feedback

Folders

Method Path Description
GET /getAllParentUserFolder/:accId/:memId Get parent folders
GET /getAllUserFolder:parId Get child folders
POST /addOrUpdateUserFolder Add/update folder
POST /addOrUpdateSharedUserFolder Add/update shared folder

Channel Partners & Affiliates

Method Path Description
GET /getAllChannelPartners:pId Get channel partners
POST /addOrUpdateChannelPartners Add/update partners
GET /getAffiliateMarketingURL/:pId Get affiliate URL
POST /addOrUpdateAffiliateDetails Add/update affiliate details
GET /getAffiliatedUsers/:id Get referred users

Account Managers

Method Path Description
GET /getAlltAccountManagers:pId Get account managers
POST /NewAccManager Create account manager
POST /addOrUpdateAccManagerMembers Assign members to managers

Conversations / Messaging

Method Path Description
GET /getAllConversationlist Get all conversations
GET /getMembersConversationlist:mid Get member conversations
GET /getAllMessagelist:conId Get messages in conversation
POST /addOrUpdateConversation Add/update conversation

Lookup / Reference Data

Method Path Description
GET /getGoalsObjects Get goals/objectives list
GET /getCategoryGroups Get category groups
GET /getDefaultCategories Get default categories
GET /getVariants Get style variants
GET /getholidays Get upcoming holidays
GET /fetchStyleList Get approved design styles
GET /fetchDefaultFolder Get default folders
GET /getSearchSuggestions Get search suggestions

Onboarding

Method Path Description
POST /getonboardingtype Get onboarding type
POST /confirmationDetails Process onboarding confirmation
POST /updateOnboardingStatus Update onboarding status

Email / Notifications

Method Path Description
POST /postGeneratingGmail Send post-generating notification
GET /specialOfferMail:pId Send special offer email

Other

Method Path Description
POST /addOrUpdateUserBillingInfo Add/update billing info
POST /addOrUpdatehelpcenter Add/update help center content
POST /pdfExtraction Extract text from PDF with Gemini
POST /bni-corporate-profile Generate BNI corporate profile
POST /saveFeedImage Save feed image to S3
POST /changeusermedia Change media on content planner post
POST /DeleteMyUpload Soft-delete user upload
GET /getPreferenceSetting:pId Get preference settings
POST /addOrUpdatePreferenceSetting Update preference settings
GET /verifySupporturl Verify support URL
GET /getImageTemplate Get image template data

File 2: routes/auth.js (~272 routes, mounted at /auth/)

Auth: router.use(auth) at line 78 -- ALL routes require JWT authentication. Auth middleware sets userId, accountId, role, isPersonnel on res. Most handlers also call checkuseraccount(userId, accountId).

Feeds & Event Posts

Method Path Description
GET /getFeeds Get non-deleted feed posts for user
GET /getConfirmationDetails Get GHL appointment confirmation
GET /getEventposts Get holiday/event post counts by region
GET /getEventpostsReplace Get event post templates with media
POST /getALLEventposts Get all events within date range
POST /scheduleEventposts Schedule event post (generate image, upload S3)
GET /getFeedChange Get feed change data
GET /getScheduledFeeds Get scheduled feeds
POST /addOrUpdateFeed Create/update feed with RSS parsing
GET /startSchedulingFeed Trigger feed scheduling
GET /getAccountsFeed Get account-level feed data

Media Library & Uploads

Method Path Description
POST /s3LinkFromMediaLib Get S3 presigned URL for media item
POST /uploadusermedia Upload user media to S3 with Polotno JSON
GET /searchAllLibrary:cId Search master template library by category
GET /getAllLibrary Get all approved library templates
GET /getSharedFolder Get shared media folders
POST /getAllSharedFolderImages Paginate shared folder images
POST /getAllSharedFolderTemps Paginate shared folder templates
POST /getAllSharedImages Get all shared images
POST /getfolderSharedImages Get shared images in folder
GET /gettempLibrary:pId Get template library by subject/category
POST /gettempbyid Get template JSON by media ID
POST /getcusmedia Get custom uploaded media with pagination
POST /geteditcusmedia Get custom media for editing
POST /geteditcarousalpost Get carousel for editing
POST /geteditusermedia Get user media for editing
POST /getlibraryuploads Get library upload items
GET /getMyLibrary/:pId Get user's media library
GET /getMyLibraryPost/:pId Get specific library post
GET /getMyNonApproveMedia Get non-approved media
POST /getUserContent/:fId Get user content in folder
POST /getUsermediaedit Get user media for editing
POST /getUsermediabyid Get media by ID
POST /addOrUpdateUserLibrary Create/update user library entry
POST /uploadAccountsAssets Upload account assets to S3

Image & Asset Management

Method Path Description
GET /getImageFolder Get image folders
GET /getImageAssets/:fId Get image assets in folder
GET /getReelIdeasAssets/:fId Get reel idea assets
GET /getContentAssets/:fId Get content assets
POST /myContentCopyPost Copy content post to folder
POST /myContentCutPost Move content post
GET /getAllImages/:pageId? Get all images (paginated)
GET /getImage/:imageId Get single image
POST /bulkActions Bulk delete/move/archive media
GET /getAllImageFolder List all image folders
GET /getAllReelIdeasFolder List reel ideas folders
GET /getAllContentFolder List content folders
GET /getAlluserSpecificFiles Get user-specific files

Social Media Accounts

Method Path Description
GET /getSelectedSocialAccounts Get linked accounts with connection status
GET /getSocialAccounts Get all social accounts
POST /tiktokRegister Register/update TikTok account
POST /sociallinkstatus Get link status of all providers
GET /getDefaultAccount Get default social account config
GET /getSocialMediaInsights Get social media analytics
POST /linkedinuserdetail Save LinkedIn auth details
POST /getLinkedSocialMedia Get linked accounts for user
GET /socialAccountStatus Get status of all connections
POST /getTiktokCreatorInfo Get TikTok creator info
POST /saveTiktokConfigurationForPost Save TikTok post config

Post Scheduling & Content Planner

Method Path Description
POST /Replacepost Replace post media
POST /userSchedulePost Schedule image post
POST /userSchedulevideo Schedule video post
POST /userSchedulereel Schedule reel post
POST /userScheduleCarousal Schedule carousel post
POST /userScheduleArticle Schedule article post
POST /userScheduleAccountNews Schedule account news post
POST /userContentSchedulePost Schedule user content
POST /userSavePost Save post as draft
POST /setpostcount Update post count
POST /reschedulepost Reschedule post
POST /rescheduleVideopost Reschedule video post
POST /rescheduleArticle Reschedule article
POST /duplicatepost Duplicate post
POST /updatefavourite Toggle favourite
POST /setcpfavourite Set content planner favourite
POST /approveSkeletonPost Approve draft post
GET /startSchedulingPosts Trigger scheduling
GET /startSchedulingStatus Get scheduling status
GET /getSchedulingStatus Get detailed scheduling status

Calendar & Post Retrieval

Method Path Description
GET /getMyScheduledDate Get dates with scheduled posts
GET /getMyScheduledPosts Get scheduled posts
GET /getMyPostsDate Get dates with published posts
GET /getMyPosts Get published posts
GET /getMyApprovalDate Get dates with pending approval
GET /getMyApprovalPosts Get posts pending approval
GET /getMyPendingApprovalPosts Get pending approval posts
GET /getMyCurrentWeekPostsDate Get current week post dates
GET /getMyNextWeekPostsDate,:nWS,:nWE Get next week post dates
GET /getMyListPosts List view of all posts
POST /getpost Get post details by ID
POST /getcarousalpost Get carousel post details
POST /getvideoposts Get video post details
POST /getfavouriteposts Get favourite posts
POST /getfavpost Get favourite post data
POST /getfavpostbyId Get favourite post by ID
GET /getPostStatus Get publishing status

Post Insights

Method Path Description
GET /getMyPostInsights Post analytics for user
GET /getMyPostOverallInsights Aggregated post insights
GET /getMyPostPlatformInsights Per-platform insights

Company Data & Onboarding

Method Path Description
GET /getCompanyData Get company/website info
GET /getOnboardingDetails Get onboarding status
GET /getOwnerPersonalDetails Get account owner details
POST /addOrUpdateCompanyData Insert/update company data
POST /replaceAICompanyData Replace with AI-generated data
POST /approveCompanyData Approve company data
POST /processOrgDetails Process org details
POST /webscrapingProcess Scrape company website
POST /accountDetailsCreation Create account details
POST /updateAccountDetails Update account details
POST /getaccountdetails Get account details
GET /getDetailForWelcomeModal Get welcome modal info
POST /addBusinessInformation Add business info
GET /getBusinessGroupSetting/:gId Get business group settings

Brand Positioning

Method Path Description
POST /AIBrandPositioning Generate AI brand positioning
POST /replaceAIBrandPositioning Replace with AI version
POST /approveBrandPositioning Approve brand positioning
POST /addOrUpdateBrandPositioning Create/update brand positioning
GET /getBrandPositioning Get current brand positioning
GET /getAiBrandPositioning Get AI-generated positioning

Objectives

Method Path Description
POST /AIObjective Generate AI objectives
GET /getObjective Get current objective
POST /addorUpdateObjective Create/update objective
GET /getAiObjective Get AI-generated objective
POST /replaceAIObjective Replace with AI version
POST /approveObjective Approve objective

AI Content Generation

Method Path Description
POST /rephraseUserCustomContent Rephrase content with AI
POST /rephraseAndTranslateContent Rephrase and translate
POST /getFirstComment Generate first comment for post
POST /openAiTest Test OpenAI classification
POST /saveAiContent Save AI-generated content
GET /getAiContent/:page Get paginated AI content
POST /getAiDataVertex Get data from Vertex AI
POST /conversationAI AI conversation from website/PDF
POST /extract-features Extract features using AI
POST /generateAIImage Generate AI image

Subjects & Topics

Method Path Description
POST /Searchsubject Search subjects
POST /addSubject Add new subject
POST /chooseRecomSubject Select recommended subject
GET /getUserChosenSubjects Get chosen subjects
POST /deleteRecSubWithContent Delete subject and content
POST /removeRecomSubject Remove recommended subject
POST /RemoveSubject Remove subject
GET /getSuggestedTopics Get AI-suggested topics
GET /getorgSubjects Get org subjects
GET /getSelectedTopics Get selected topics
GET /getRecommendedTopics Get recommended topics
POST /addOrUpdateRecommendedTopics Update recommended topics
GET /getUserTopics Get user topics

Settings & Preferences

Method Path Description
GET /getSetting Get account settings
GET /getuserSetting Get user-level settings
POST /addOrUpdateSetting Create/update settings
GET /getApprovedDates Get approval timestamps
GET /getUserTimeZone Get timezone setting
GET /getUserFeature Get enabled features
GET /getuserpermissions Get user permissions
POST /setuseractive Set user active status
POST /setonline Mark user online
POST /savecolorset Save brand color set
POST /brandCustomize Update brand customization
POST /brandholidaypost Configure holiday post settings

Subscription & Billing

Method Path Description
GET /getSubscriptions Get subscription details
POST /addOrUpdateSubscriptions Create/update subscriptions
GET /getCreditCardInfo Get stored card info
POST /getPlanById Get plan by ID
POST /getBillinginfo Get billing info
GET /getallPlans Get all plans
GET /getPlans Get available plans
POST /getOnboardingPlans Get onboarding plans
GET /getexistingPlans Get current plan
GET /getPlans/:crs/:cId Get plans by currency/country
POST /createpaymentintent Create Stripe payment intent
POST /createstripecustomer Create Stripe customer
POST /stripesubscription Create Stripe subscription
POST /chkPayWall Check paywall status
POST /addOrUpdateUserBillingInfo Update billing info
POST /updateSubscription Update subscription (upgrade/downgrade)
GET /checkCancelStripeOrPaddle Check cancellation status
GET /paddleManagementUrl Get Paddle management URL
POST /getPaddleSubData Get Paddle subscription data
POST /paddlePaymentUpdate Process Paddle payment update
POST /impact-conversion Report Impact affiliate conversion
POST /cancel-impact-conversion Cancel Impact conversion
GET /getOneTimePriceId Get one-time price ID

Templates & Designs

Method Path Description
POST /addOrUpdateUserTemplates Create/update user templates
POST /addOrUpdateUserCarousals Create/update carousel templates
POST /UpdateUserCarousals Update carousel
POST /UpdateCpCarousals Update content planner carousel
POST /addOrUpdateUserFolderTemplates Create/update folder templates
POST /addUserFolderTemplatesById Add template to folder
POST /UpdateUserTemplates Update user templates
POST /UpdateUserpost Update user post
POST /Updatecuspost Update custom post
POST /brandTemplateSet Configure brand template set
POST /addOrUpdateTempSet Create/update template set
GET /getContentTemplate Get content templates

Favourite Template Sets

Method Path Description
GET /getUserFavTempSetList/:pId Get favourite template sets
GET /getFavTempSet/:sId Get specific template set
GET /getSuggestedFavTempList Get suggested template sets
GET /getMatchingTemplates/:userLibId/:accountId Get matching templates
POST /addToFavTempset Add to favourites
POST /deleteFavTemp Delete favourite template
GET /getFavTemp/:tId Get favourite template
POST /updateFavTemp Update favourite template

Fonts

Method Path Description
GET /getGoogleFonts Get Google Fonts list
GET /getMyFonts Get user's custom fonts
POST /saveFont Create/update/remove font
GET /getPolotnoUserFonts Get fonts for Polotno editor

User & Account Management

Method Path Description
GET /getUserdetail Get user profile
GET /getUserInvitation Get invitation details
POST /setlandingaccount Set default account
POST /searchUser Search users
POST /uploadLogo Upload account logo
GET /getlogo Get account logo
GET /getaccountowner Get account owner
POST /getAllcorpInvitedUsers Get corporate-invited users
POST /Removelogo Remove account logo
GET /getuseraccounts Get user's accounts
POST /createAccount Create new account
GET /getAccountinactiveusers Get inactive users
GET /userlist/:pId/:rId/:status/:tStatus List users with filters
GET /getAllOwnerList Get all account owners

Website & RSS Feeds

Method Path Description
GET /getAccountWebsiteFolders Get website folder structure
GET /getAccountsWebsiteNews:fId/:pId Get website news
POST /addAccountWebsites Add website URLs to track
POST /process-url Process URL for content extraction

Reels

Method Path Description
GET /:accountId/reelsIdea Get reel ideas for account

Knowledge Base (BNI)

Method Path Description
GET /getChapterDetails Get BNI chapter details
GET /getBniOrgDetails Get BNI org details
GET /getCloudKnowledgeBase Get cloud knowledge base data

File 3: routes/social.js (15 routes, mounted at /social/)

Auth: None (Passport session-based OAuth flows). All routes are GET.

Method Path Description
GET /login/success Decrypt token and return user data
GET /login/failed Return 401 with session error
GET /logout Logout and redirect to client
GET /google Initiate Google OAuth2
GET /google/callback Handle Google OAuth2 callback
GET /github Initiate GitHub OAuth
GET /github/callback Handle GitHub OAuth callback
GET /facebook Initiate Facebook OAuth (pages, IG, insights scopes)
GET /facebook/callback Handle Facebook OAuth callback
GET /linkedin Initiate LinkedIn OAuth
GET /linkedin/callback Handle LinkedIn OAuth callback
GET /twitter Initiate Twitter/X OAuth
GET /twitter/callback Handle Twitter OAuth callback
GET /tiktok Initiate TikTok OAuth
GET /tiktok/callback Handle TikTok OAuth callback

File 4: routes/paddle.js (2 routes, mounted at /paddle/)

Auth: router.use(auth) -- ALL routes require authentication.

Method Path Description
POST /subscriptionList List Paddle subscriptions by status with DB enrichment
POST /customerList List Paddle customers with subscription details

File 5: routes/partnerAuth.js (4 routes, mounted at /partnerAuth/)

Auth: Custom JWT-based partner authentication per route (Bearer token in Authorization header).

Method Path Auth Description
POST /partnerAuthentication No Authenticate partner with ID/secret, return JWT (1h)
POST /registerUser JWT Register user on behalf of partner
POST /singleSignOn JWT Generate SSO login URL for existing user
POST /partnerSignIn No Generate partner sign-in redirect URL

File 6: dashboard/routes/index.js (22 routes, mounted at /auth)

Auth: router.use(auth) applied only in development mode. In production, routes depend on upstream auth middleware sharing the /auth mount path. All routes are GET.

Method Path Description
GET /getAccountInsights/:startTime/:endTime/:pId Aggregated follower/like insights per platform
GET /getAccountFollowers/:startTime/:endTime/:pId Daily follower counts and growth per platform
GET /getTopPostsInsights/:startTime/:endTime/:pId/:cId Top 5 posts by likes/views/comments
GET /getPostsLikes/:startTime/:endTime/:pId Daily post likes per platform
GET /getRoiViews Total views and active days for ROI
GET /getPostsViews/:startTime/:endTime/:pId Daily post views per platform
GET /getPostsEngagements/:startTime/:endTime/:pId Daily engagement rate per platform
GET /getPostInsights/:startTime/:endTime/:pId Aggregated post insights per platform
GET /getPostsTotalEngagements/:startTime/:endTime/:pId Daily total engagement per platform
GET /leaderboard/:pId Ranked leaderboard of members by followers
GET /member-followers-graph/:memberId Monthly follower data (12 months)
GET /accountActiveMembersPlatforms/:accountId Active members with platform accounts
GET /membersSocialGrowth/:memberId/:fromDate/:toDate Per-platform follower growth
GET /getMembersPostInsights/:memberId/:startTime/:endTime/:pId Member post insights
GET /getMembersfollowersGrowth/:memberId/:startTime/:endTime/:pId Member daily followers
GET /getMembersPostLikes/:memberId/:startTime/:endTime/:pId Member daily post likes
GET /getMembersPostViews/:memberId/:startTime/:endTime/:pId Member daily post views
GET /getMembersPostEngagement/:memberId/:startTime/:endTime/:pId Member daily engagement
GET /getMembersTopPosts/:memberId/:startTime?/:endTime?/:cId/:pId? Member top 5 posts
GET /reach/getAccountStats/:pId Reach funnel stats (followers, views, likes)
GET /reach/getAccountNetGrowth/:pId? Net growth since account creation
GET /reach/activityMeter Activity meter (posts, approvals, last 14 days)