1. Users
Returning.AI
  • Getting Started
  • Users
    • Get user
      GET
    • Get Users with Filters
      POST
    • Create New User
      POST
    • Get User Data
      POST
    • Manage User Account
      POST
    • List mini-game logs by user email
      POST
    • Get current mini-game and streak state
      POST
    • Get User Milestones
      POST
    • Update User Data, Identifier, And Roles
      POST
    • Update User XP and Currency
      POST
  • Messaging
    • Agent messaging workflow
    • Get Messages
      GET
    • Send Message
      POST
    • Reply Message
      POST
    • React Message
      POST
    • Upload message images
      POST
  • Gamification
    • Leaderboards
      • List leaderboards with pagination
      • Create a new leaderboard
      • Update an existing leaderboard
      • Get a single leaderboard by ID
      • Delete a leaderboard
    • Streaks & Mini Games
      • List user streak logs
      • Update user spin-wheel information
    • Referral
      • Referral Program Integration
      • Mini-game State and History
      • Get referral programs
      • Get user's referral summary
    • Rolling Data
      • Get Daily Calculation Data
      • Get Rolling Calculation Data
    • Match Predictions
    • Get tier configuration
      GET
    • Get daily user XP and coin changes
      POST
    • Search user gamification logs
      POST
    • Get user activity stats
      POST
  • Rewards & Redemptions
    • Update redemption order status or refund
    • List redemption orders by user email
    • List redemption statuses
    • Get redemption status by ID
    • List redemption orders by community
    • Create redemption order status
    • Get redemption order status history
  • Chart Analysis
    • Create Analysis
    • Get Analysis
    • Update Analysis
    • Delete Analysis
    • List Analyses
    • Append Drawings
  • Bulk Operations
    • List bulk update jobs
    • Get bulk update job status
    • Get bulk update job details
    • Bulk update users from CSV
    • Bulk update premium currency from CSV
  • Channels
    • Iframe
    • List integration channels
  • Events
    • Outgoing webhooks
      • Encryption
      • User Joins Server
      • User Visits server
      • New Message Posted Anywhere
      • New Message Posted To channel
      • Purchased Store Item
    • Incoming webhooks
      • API Keys & Encryption
      • Send message into channels
      • Update Custom User Fields
      • Update In-game currency
  • Widgets
    • Authenticated Widgets
    • Public widgets
  • Community Analytics
    • Get Loyalty Overview
    • Get Phone Verification Contacts
  • Store
    • Purchase History
      • Update redemption instructions or voucher details
    • Categories
      • List Store categories
      • Create Store category
      • Get Store category by ID
      • Update Store category
      • Delete Store category
    • Products
      • List products
      • Update products in bulk
      • Create products in bulk
      • Create product with vouchers
      • Read product
      • Update product and append vouchers
      • Delete product
    • Redemption-transaction
      • Get redemption transaction detail
    • Get Store configuration
    • Update Store configuration
  • Community
    • Appearance
      • Update community theme colors
      • Update community bot profile
      • Update community URL metadata
      • Update community name and URL
    • Community Users
      • Get community users
      • Get user
    • Create community
  • API Keys
    • Community API Keys
      • Create API key
      • Read API keys
      • Delete API key
      • Update API key
    • User API Keys
      • List user API keys
      • Create user API key
      • Update user API key
      • Delete user API key
      • Get current API key information
  • User Fields
    • User Field History
      • Get all user field histories in a community
      • Get user field histories for a specific field
      • Get user field histories for a specific user
      • Get user field histories of specific user field and user
      • Update A User Field Value
      • Deprecated Field-First History Write
      • Deprecated Field-First History Read
    • Get A User Field Definition
    • Update A User Field Definition
    • Create A User Field Definition
    • Delete A User Field Definition
    • List User Field Definitions
    • Delete user field
    • Update user field
    • Get specific user field
  • Legacy
    • Servers
      • Create server
      • List servers
      • Update server metadata
    • Bulk Operations
      • Bulk import users from CSV
    • Authentication
      • Secure Auth
      • Register user with password
      • Verify user email
      • Log in user with password
    • Badges
      • List badges
      • Create badge
      • Update badge
      • Delete badge
      • Remove badge from user
      • Award badge to user
    • Messaging
    • Roles & Permissions
      • List server roles
      • Create role
      • Update role
      • Delete role
      • List user roles
      • Add role to user
      • Remove role from user
    • Users
      • Upload user avatar
    • Channels
      • Create channel
      • Update channel
      • Delete channel
    • API Keys
      • List integration API keys
      • Create integration API key
      • Delete integration API key
      • Update integration API key
  • Schemas
    • Sample Schemas
    • Schemas
    • Outgoing webhooks
    • Analysis
    • Pet
    • Category
    • Tag
    • ValidationError
    • NotFoundError
    • InternalServerError
    • NotImplementedError
    • CreateUserFieldHistoryResponse
    • CreateUserFieldHistorySuccessResponse
    • UserFieldHistoryItem
    • GetUserFieldHistoriesResponse
    • UserFieldHistoriesValidationError
    • UserFieldHistoriesMetaWithValidation
    • UserFieldHistoriesMetaWithPagination
    • GetUserFieldHistoriesSuccessResponse
    • CreateUserFieldResponse
    • CreateUserFieldSuccessResponse
    • DeleteUserFieldResponse
    • DeleteUserFieldSuccessResponse
    • UserFieldCreator
    • GetUserFieldResponse
    • GetUserFieldSuccessResponse
    • ValidationErrorItem
    • GetUserFieldsMetaResponse
    • CreatorInfo
    • UserFieldResponse
    • GetUserFieldsSuccessResponse
    • UpdateUserFieldResponse
    • UpdateUserFieldPayload
    • UpdateUserFieldSuccessResponse
    • MetaResponse
    • GetUserResponse
    • GetUserSuccessResponse
    • Purchased store item
    • ErrorResponse
    • New message posted to channel
    • UpdateAnalysisRequest
    • User visits server
    • AppendDrawingsRequest
    • User join server
    • CreateAnalysisResponse
    • GetAnalysisResponse
    • UpdateAnalysisResponse
    • AppendDrawingsResponse
    • AnalysisMetadata
    • Expiry
    • Levels
    • LevelEntry
    • Drawing
    • HorizontalLineDrawing
    • LineDrawing
    • RectangleDrawing
    • ParallelDrawing
    • FibonacciRetracementDrawing
    • Coordinate
    • DrawingStyle
    • AnalysisDetail
    • AnalysisSummary
    • CreateAnalysisRequest
    • ListAnalysesResponse
    • StandardApiError
    • StandardSuccessEnvelope
    • PurchasedStoreItemEvent
    • ChannelMessagePostedEvent
    • UserVisitedCommunityEvent
    • UserJoinedCommunityEvent
  1. Users

Get current mini-game and streak state

POST
/v1/users/mini-game-streak-stats

What this endpoint does#

Returns a user's current spin-wheel availability and current streak status for the API key's community. Use it to answer what is true now: which active wheels are configured, how many unconsumed spins are available, whether the current mission is cleared, whether the user has spun during the current UTC day, and the current streak counters.
For historical questions such as “when was the spin earned or used?”, follow this call with List mini-game logs by user email.
WARNING
Keep the Community API key on your server. This endpoint requires the customerSuccess permission. Do not expose the key in browser code, mobile bundles, URLs, logs, screenshots, or analytics.

Quick start#

{ "email": "member@example.com" }
email is required, must be a valid email address, and is matched case-insensitively. The API key determines community scope; do not send a community ID.

Authentication and permission#

Send the Community API key as Authorization: Bearer <community-api-key>. The key must be active, must select the intended community, and must include customerSuccess. Keep it server-side. Missing or invalid authentication returns 401; a valid key without the permission returns 403 on this route.

Complete examples#

The request above returns one synthetic configured-state example and one empty-configuration example below the response schema. The configured example demonstrates a wheel with one available spin and a current streak. The empty example returns wheels: [] and streaks: []; it is still a successful read.

Success and readback#

data.wheels contains every active spin_the_wheel mini-game configured in the community. data.streaks contains the community's configured streaks. Array order is not a contract; match records by name.

Wheel fields#

FieldMeaning
nameConfigured wheel name. Treat it as configuration, not a stable programmatic ID.
spinsCount of currently available spin-inventory records. Used, expired, or removed spins are not counted.
missionClearedtrue only when the latest non-expired mission activity for that wheel is completed. It resets when the mission period expires.
spinTodaytrue when at least one spin result exists for this wheel between 00:00:00.000 and 23:59:59.999 UTC today.
currentStreakCurrent stored wheel streak. Returns 0 when no wheel stats exist.

Streak fields#

FieldMeaning
nameConfigured streak name.
currentStreakCurrent count stored for this streak; defaults to 0.
missionClearedWhether the most recent active, non-expired streak activity is completed.
The endpoint recalculates this read model from current configuration and current records on each request. It does not mutate spins, streaks, missions, or rewards.

Empty and zero states#

A successful response may contain empty arrays when the community has no active spin wheels or configured streaks. A configured wheel may legitimately return all zero/false values. Neither state proves that data exists in another community, and current zero values do not explain historical eligibility by themselves.

Errors and recovery#

400: missing or invalid email.
401: missing, invalid, or expired authentication.
403: the key is valid but lacks customerSuccess.
404: no user can be resolved for the supplied email.
500: unexpected service failure.

Retry safety#

This endpoint is read-only and does not support or require an Idempotency-Key. Retrying does not consume spins or change streaks. The values are recalculated on every request, so a later successful retry may legitimately differ when a spin is earned, used, or expires between calls.

Gotchas#

spinToday uses the UTC day, not the user's or broker's local timezone.
missionCleared, spinToday, spins, and currentStreak are independent signals.
Array order is not guaranteed; match by name.
Names come from mutable configuration and are not durable IDs.
Empty or zero state does not explain historical events; use the logs endpoint.

Next steps#

For the complete current-state and history workflow, see Mini-game State and History.
1.
Call this endpoint first for current availability.
2.
Match the requested wheel or streak by name; do not depend on array position.
3.
If the state is surprising, call List mini-game logs by user email and compare spin-earned, spin-used, spin-expired, and streak events.
4.
Compare timestamps in UTC and account for the configured mission period.
5.
Do not infer entitlement from trading volume or another business metric alone; the mini-game state is the authoritative read for current availability.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Current state fetched. Arrays may be empty.
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Error
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.returning.ai/v1/users/mini-game-streak-stats' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "member@example.com"
}'
Response Response Example
200 - Success Example
{
  "status": "success",
  "message": "User mini game and streak stats fetched successfully",
  "data": {
    "wheels": [
      {
        "name": "Weekly rewards wheel",
        "spins": 1,
        "missionCleared": true,
        "spinToday": false,
        "currentStreak": 3
      }
    ],
    "streaks": [
      {
        "name": "Weekly activity streak",
        "currentStreak": 3,
        "missionCleared": true
      }
    ]
  }
}
Modified at 2026-08-17 18:44:58
Previous
List mini-game logs by user email
Next
Get User Milestones
Built with