Skip to content

Platform & ecosystem API

The remaining route groups — roughly 50 mounts under /api. This page is a directory rather than an endpoint reference; most of these modules document themselves in ad-hoc markdown inside bz-backend.

Mount table: bz-backend/routes/index.js.

Full mount table

MountRoute fileDomain
/api/commoncommon.routes.jsShared utilities
/api/appappRoutes.jsApp metadata
/api/authauthRoutes.jsLogin, SIWE, tokens
/api/useruserRoutes.jsUsers, usernames, referrals
/api/adminadmin.routes.jsAdmin
/api/defidefi.routes.jsTrading, providers, fiat, perps, DCA, Autopilot
/api/transactiontransactionRoutes.jsGeneric transactions
/api/balancebalance.routes.jsBalances
/api/walletwallet.routes.jsWallet operations
/api/graphgraph.routes.jsChart data
/api/cmccmc.routes.jsCoinMarketCap proxy
/api/currencyproxy.routes.jsCurrency proxy
/api/bridgebridge.jsBridge helpers
/api/qubeticsqubeticsRoutes.jsQubetics chain
/api/liquidityliquidityRoutes.jsLiquidity (product unshipped)
/api/paymentpaymentRoutes.jsPayments
/api/productproductRoutes.jsProduct catalogue
/api/cartcartRoutes.jsCart
/api/marketplacemarketplaceRoutes.jsNFT marketplace
/api/nftnftRoutes.js + nftMetadataRoutes.jsNFTs — mounted twice
/api/mintmintRoutes.jsMinting
/api/pinatapinataRoutes.jsIPFS pinning (mounted separately, not via routes/index.js)
/api/stakingstakingRoutes.jsToken staking
/api/rocketrocketRoutes.jsBlazRocket
/api/blazbobblazBobRoutes.jsBlazBob
/api/rewardrewardRoutes.jsRewards
/api/rewardsrewardsRoutes.jsRewards hub
/api/claimclaimRoutes.jsClaims
/api/taskdailyTaskRoutes.jsDaily tasks
/api/daily-updatesdailyUpdateRoutes.jsUpdate log
/api/entryPassentryPassRoutes.jsEntry pass NFT
/api/gamegameRoutes.jsGames
/api/predictionpredictionRoutes.jsPrediction markets
/api/pokerpokerRoutes.jsPoker
/api/daodaoRoutes.jsDAO
/api/presalepresaleRoutes.jsPresale
/api/presale/adminpresaleAdminRoutes.jsPresale admin
/api/whitelistwhitelist.routes.jsWhitelists
/api/clippersclippersRoutes.jsClippersalso at /api/v1/clippers
/api/smmsmmRoutes.jsSocial media management
/api/blogsblogRoutes.jsBlog
/api/threadsthreadRoutes.jsForums
/api/chatschatRoutes.jsUser-to-user chat
/api/questionsquestionRoutes.jsQ&A
/api/supportsupportRoutes.jsSupport tickets
/api/supportForDasboardsupportRoutesForDashboard.jsDashboard support — typo in the live path
/api/submitsubmit.routes.jsSubmissions
/api/notificationsnotificationsRoutes.jsIn-app notifications
/api/fcmfcmNotificationRoutes.jsPush (Firebase)
/api/sessesEmail.routes.jsEmail (AWS SES)
/api/bulk-emailbulkEmail.routes.jsBulk email
/api/webhookswebhookRoutes.jsInbound webhooks
/api/videovideo.routes.jsVideo
/api/extextension.routes.jsBrowser extension
/api/lightLinklightLinkRoutes.jsLightLink chain
/api/lightLinkRewardlightLinkRewardRoutes.jsBridge-usage campaigns
/api/cacaRoutes.jsSmart-contract accounts
/api/migrationmigrationRoutes.jsMigrations
/api/kanbankanbanRoutes.jsInternal kanban
/api/miscmiscRoutes.jsMiscellaneous
/api/debug-statsinlineDebug — no middleware

System settings

The platform's feature-flag and limit store. Prefer it over a new config collection.

js
await SystemSetting.getValue('audit_free_limit_per_wallet')      // default 3
await SystemSetting.setValue('audit_free_limit_per_wallet', 5)
await SystemSetting.getByCategory('limits')

Categories: bridge, security, network, fees, limits, general. Model: models/systemSettingModel.js.

Four Autopilot settings are seeded by scripts/seed-autopilot-settings.js.

Env var vs system setting

Changing an env var needs SSH and a restart. Changing a system setting is a database write. Use env vars for secrets and infrastructure; use system settings for limits and flags.

Rewards & staking

GET /api/rocket/status returns, per staked rocket: tokenId, level, isStaked, stakedAt, lastClaimTime, streakDays, longestStreak, plus:

FieldMeaning
claimablePointsAvailable now
currentRatePerHourBase plus active bonuses
maxDailyCap / remainingDailyCapDaily ceiling and headroom
nextClaimAvailableInMinutes; 0 = ready
rocketImage, upgradeImagesRendered assets per upgrade slot

POST /api/rocket/claim with { rocketId }. Auth: Bearer token.

Claims are entirely off-chain

Zero gas, instant balance update. NFT ownership and staking state are on-chain; points accrual is a backend calculation. That is what makes daily claiming viable at small amounts — and it means the platform is trusted for the points ledger.

Frontend rule: enable the claim button when nextClaimAvailableIn === 0 and claimablePoints > 0.

In-repo docs: ROCKET_REWARDS_README.md, ROCKET_CLAIMING_PROCESS_README.md, ROCKET_UPGRADE_GUIDE_ANNOUNCEMENT.md, blazbob_staking_guide_hemi.md, REWARDS_HUB_REVAMP_PLAN_2026-06.md.

Prediction markets

Tuned entirely by environment variable:

VariableEffect
PREDICTION_MIN_STAKE, PREDICTION_MAX_STAKEBet bounds
PREDICTION_DAILY_LIMITPer-user daily cap
PREDICTION_LOCK_BEFORE_END_SECONDSBetting cutoff
PREDICTION_{MIN,MAX}_{UP,DOWN}_POOLPool bounds
PREDICTION_SEED_ENABLED, PREDICTION_FAKE_PARTICIPANTSSynthetic seeding

PREDICTION_FAKE_PARTICIPANTS seeds synthetic participants

Whatever the product rationale, know it exists before making any claim about market depth or participation.

Settlement: services/predictionCron.js via initPredictionCron().

Poker

contracts/poker/PokerManager.sol on-chain; table state and dealing in the backend; hand history in models/pokerHandHistory.js. Realtime over a Socket.io namespace.

VariableEffect
POKER_PLATFORM_FEE_ENABLED, POKER_PLATFORM_FEE_BPSRake
POKER_FEE_TO, POKER_ESCROW_TODestinations

In-repo docs: poker.md, pokerFrontend.md, SOCKET_DEBUG_GUIDE.md.

Analytics APIs

Two dedicated specs at the defi-set root:

DocumentCovers
TOKEN_PAYMENT_ANALYTICS_API.mdtokenPaymentModel analytics
TRANSACTION_V2_ANALYTICS_API.mdtransactionV2Model analytics

Microservice routing toggles

Several modules can be proxied to separate services rather than handled in-process:

REWARDS_HUB_FORCE_PROXY, REWARDS_HUB_PROXY_GROUPS, REWARDS_HUB_PROXY_PREFIXES, REWARDS_ADMIN_FORCE_PROXY, REWARDS_ADMIN_PROXY_GROUPS, REWARDS_ADMIN_NATIVE_WRITE_GROUPS, THREADS_FORCE_PROXY, THREADS_PROXY_GROUPS, USE_LEGACY_REWARDS.

The monolith is partly split already

microservices-backend/, new-backend/ and gateway/ exist in the tree, and these flags route traffic away from the in-process handlers. None of those directories is mounted by routes/index.js — so the split is configuration-driven and partial. Check the flags before assuming where a request is served.

Socket.io

Four namespaces, not HTTP:

NamespacePurpose
defaultChat and payments (chatAndPay.service.js)
priceNamespacePrice streaming
predictionNamespacePrediction market updates
pokerTable state (pokerSocketHandler.js)

Auth: middleware/authSocketMiddleware.js. Redis adapter when available. See runtime topology.

Quest platform integrations

VariablePlatform
GALXE_API_KEYGalxe — galxe.com is CORS-allowlisted
ZEALY_API_KEYZealy
INTRACT_API_KEYIntract
SMM_API_KEYSocial media management

Route bugs to know

BugDetail
/api/supportForDasboardTypo in a live path. Fixing it breaks whatever consumes it
/api/nft mounted twicenftRoutes then nftMetadataRoutes — the second only serves paths the first does not claim
/api/clippers and /api/v1/clippersSame route file, two mounts
GET /api/debug-statsRegistered before all middleware, deliberately. It is unauthenticated

Where the real documentation lives

For the ecosystem layer, these in-repo files are the authority:

bz-backend/
  ROCKET_REWARDS_README.md            ROCKET_CLAIMING_PROCESS_README.md
  ROCKET_UPGRADE_GUIDE_ANNOUNCEMENT.md
  blazbob_staking_guide_hemi.md       blazbob_unstaking_guide_hemi.md
  REWARDS_HUB_REVAMP_PLAN_2026-06.md  MODULE_BUSINESS_AUDIT_2026-06.md
  MARKETPLACE_INTEGRATION.md          CLIPPERS_API_SPEC.md
  FRONTEND_BLAZBOB_INTEGRATION.md     ROCKET_UPGRADE_GUIDE_ANNOUNCEMENT.md
  poker.md  pokerFrontend.md          SOCKET_DEBUG_GUIDE.md
  claimAll.md                         BACKEND_GUIDE_DAILY_UPDATES.md
  postman/                            docs/  examples/

postman/ holds request collections, which are often faster than reading a controller.

Internal + developer documentation. Usage figures are point-in-time snapshots — re-verify before publishing them.