Reference

API endpoints

The REST surface behind every hook, the headers it needs, and using the client directly.

The REST surface behind the SDK. Most of it you never call directly, since the hooks cover it. Useful for debugging, and for reading what a hook is doing in your network tab.

Base URL is your gamerBaseUrl. Beta and production differ.

Headers

HeaderWhen
xb-tenantEvery request. Your tenant.
Authorization: Bearer <accessToken>Every request once signed in.

The SDK sets both. If you use meta.http from useFanbase(), you get them too.

{communityId} in the paths below is your community's id. The SDK resolves it from your slug with the first call under Community, so you never supply it.

Auth

MethodPathNotes
POST/v1/user/auth/{provider}/loginExchanges an OAuth callback token for a session. loginWithToken calls this.

Fan

MethodPathNotes
GET/v1/user/profileWallets. Feeds authProfile.wallets.
GET/v1/user/socialsLinked accounts, with expiry dates. useLinkedSocials. Feeds authProfile.socials.
GET/v1/user/socials/{accountType}One linked account
POST/v1/user/socials/bind-tokenRedeems a link token. useBind. Linking accounts.

Community

MethodPathNotes
GET/v1/community/{slug}Resolves your slug to a community. Everything scoped to a community starts here.
GET/v1/community/{communityId}/membershipThe fan's membership. Fails for a non-member. Membership.
GET/v1/community/{communityId}/membership/tiersThe community's tiers
GET/v1/community/{communityId}/ranking/xpThe fan's XP and level. useCommunityXP.
GET/v1/community/{communityId}/resource-typesCurrency names. Public.

Quests

MethodPathNotes
GET/v1/questsThe list. useQuestsList. One call per page.
GET/v1/quests/{id}One quest. Quest.Provider.
POST/v1/quests/{id}/acceptAccept step
POST/v1/quests/{id}/completeSubmit and complete
POST/v1/quests/{id}/refreshRe-checks a progress-tracked quest
GET/v1/quests/{id}/resultsPoll and prediction outcomes. useQuestResults.
GET/v1/quests/{id}/reward/allocationsThe fan's rewards on a quest. fetchRewards.
POST/v1/quests/{questId}/reward/allocations/claim/{rewardAllocationId}Claims one reward
GET/v1/quests/historyThe fan's completed quests
GET/v1/quests/{questId}/streakThe fan's streak on one quest
GET/v1/quests/statsCommunity quest counts

Battlepass

MethodPathNotes
GET/v1/battlepass/progressThe live season and the fan's progress. Returns season: null when there is no active season.
GET/v1/battlepass/seasonsEvery season, for a switcher
GET/v1/battlepass/seasons/{seasonId}One season
POST/v1/battlepass/tiers/{questId}/completeCompletes a tier. Never use the quest endpoint for a tier.

A tier's rewards claim through the ordinary quest allocation claim above. There is no battlepass claim endpoint.

Store

MethodPathNotes
GET/v1/store/listingsListings, filtered and paged on the server
GET/v1/store/tagsTags, for filters
GET/v1/store/carouselFeatured slides
GET/v1/store/balanceThe fan's balances, one per currency
POST/v1/store/purchase/{listingId}Buys a listing. Carries a nonce. Never retry with a new one.
GET/v1/store/purchaseThe fan's purchase history
GET/v1/store/purchase/{purchaseId}One purchase, with its delivery status

Leaderboard

MethodPathNotes
GET/v1/community/{communityId}/leaderboard/{slug}One page of a board. Public.
GET/v1/community/{communityId}/ranking/{slug}The fan's own row. xp or quests.

Newsfeed

MethodPathNotes
GET/v1/community/{communityId}/newsThe feed
GET/v1/community/{communityId}/news/{newsId}One post
POST/v1/community/{communityId}/news/{newsId}Reacts to a post
GET/v1/community/{communityId}/news/publishersPublishers
GET/v1/community/{communityId}/news/reactions/typesThe community's reaction emoji
GET/v1/community/{communityId}/news/{newsId}/commentsComments
POST/v1/community/{communityId}/news/{newsId}/commentsPosts a comment or reply
PUT/v1/community/{communityId}/news/{newsId}/comments/{commentId}Edits a comment
DELETE/v1/community/{communityId}/news/{newsId}/comments/{commentId}Deletes a comment
GET/v1/community/{communityId}/news/{newsId}/comments/{commentId}/repliesMore replies
POST/v1/community/{communityId}/news/{newsId}/comments/{commentId}/voteVotes on a comment
POST/v1/community/{communityId}/news/{newsId}/comments/{commentId}/reactionsReacts to a comment

Prizes and inventory

MethodPathNotes
GET/v1/inventory/prizesPrizes. ownedOnly narrows to the fan's.
GET/v1/inventory/prizes/{prizeId}One prize, with the details it asks for
GET/v1/inventory/lootboxA loot box's possible items. The reveal.
POST/v1/inventory/lootbox/claimSends a won prize's details. Only when it is claimable.
GET/v1/community/{communityKey}/inventory/items/{itemId}One item the fan holds
GET/v1/inventory/personalizationsCosmetics
GET/v1/inventory/personalizations/equippedWhat the fan is wearing
POST/v1/inventory/personalizations/equipEquips one
DELETE/v1/inventory/personalizations/equip/{kind}Takes one off
POST/v1/inventory/personalizations/equip/batchEquips a whole draft

Using the client directly

const { meta } = useFanbase()
const profile = await meta.http.get('/v1/user/profile')

Prefer this over your own fetch, so the tenant header and token handling stay in one place.

Server-to-server

This SDK is for browser apps and its tokens are fan sessions. Backend integrations that read community data on a schedule use the platform Data API with an API key instead, which is a separate surface. Ask your FanBase contact.

On this page