v4
latestOpenAPI 3.1.02026-08-08221179273.1 KBgamification
Purchase Item
Purchase an item with tokens.
- item_key: The unique key of the item to purchase (e.g., 'theme_ocean', 'frame_gold')
This endpoint validates the user's token balance, deducts the tokens, and grants the item to the user. Returns the new balance and item details.
post/api/gamification/items/purchase
Query parameters
pricing_variant'default' | 'paid_tokens'
Which shop pricing to apply. Cohort bucketing for the paid_token_exp experiment happens client-side (see paid_token_exp_treatment_allocation / paid_token_exp_legacy_cutoff_timestamp in /api/config), so the client tells the backend which price column applies for a given request.
Which price to charge -- 'paid_tokens' for the paid_token_exp treatment cohort
Headers
x-user-idstring nullable
Request body
Response
Successful Response