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

List mini-game logs by user email

POST
/v1/mini-game-logs/by-email

What this endpoint does#

Returns a newest-first, paginated history of mini-game events for one user in the API key's community. Use it to explain what happened: when a spin was earned, used, expired, or manually adjusted; how a streak changed; or how a quiz progressed.
This is a historical audit endpoint. It does not calculate whether the user can spin right now. For current availability, call Get current mini-game and streak state first, then use this endpoint to explain the timeline.
WARNING
Keep the Community API key on your server. This endpoint requires the customerSuccess permission and can return operational history and embedded user snapshots. Do not call it directly from browser or mobile code.

Quick start#

{
  "email": "member@example.com",
  "limit": 20,
  "page": 1
}
FieldRequiredRulesMeaning
emailYesValid email addressMatched case-insensitively.
limitNoInteger from 1 to 100; default 10Maximum rows returned on this page.
pageNoInteger greater than or equal to 1; default 1One-based page number.
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. This legacy route may return 401 both for invalid authentication and for a key that lacks the permission.

Complete examples#

The request above fetches the first 20 rows. A populated 200 response contains data.logs plus data.pagination; the response examples below the schema include one synthetic spin-earned row. The empty 200 example contains logs: [], total: 0, and totalPages: 0. Both are successful reads.

Success and readback#

Rows are ordered by createdAt descending, so page 1 contains the newest events. data.pagination.total is the total matching row count and totalPages is calculated from the effective limit. A successful lookup with no mini-game history returns 200, logs: [], total: 0, and totalPages: 0.
Every row has core identity and classification fields. Other fields are action-specific and may be absent.
FieldMeaning
miniGameTypeCurrent values are spin_the_wheel and quiz.
gameNameConfigured game name at the time represented by the log.
actionEvent classification. See the table below.
actionDetailsOptional human-readable event detail.
mission*Mission identity/timeframe when the event came from a mission.
spinInventoryId, spinResultIdOpaque internal references for correlating spin records.
prizeReward, finalRewardOptional { currency, xp } reward snapshots.
streakBefore, streakAfter, highestStreakOptional streak transition fields.
expiresAt, expiredAtUTC timestamps when a spin becomes invalid or was marked expired.
createdAt, updatedAtUTC record timestamps. Use createdAt for event chronology.
userOptional personal-data snapshot. Use userId for correlation; do not persist, forward, or branch integration logic on this embedded object.
Known action values:
spin-earned, spin-used, spin-expired, spin-claimed
mission-progress
streak-earned, streak-broken
admin-updated
quiz-started, quiz-completed, quiz-passed, quiz-failed
Do not assume every action includes every optional field. Branch on action and tolerate additional metadata.

Errors and recovery#

400: invalid email, limit outside 1..100, page < 1, or another validation failure.
401: missing/invalid authentication or a key without customerSuccess on this legacy permission path.
404: no user can be resolved for the supplied email.
500: unexpected service failure.
A 200 with an empty logs array means no matching mini-game logs were found in this community. It is not proof about the user's activity in another community and is not proof of current eligibility.

Retry safety#

This endpoint is read-only and does not support or require an Idempotency-Key. Retrying a failed request does not create duplicate mini-game events. Page-based results are not a frozen snapshot: new events can move older rows to later pages between requests. Retry the same page after transient 500 failures, and use event IDs plus timestamps to deduplicate records in a local export.

Gotchas#

Page 1 is newest first, but ordering among exact timestamp ties is not separately guaranteed.
Optional fields vary by action; absent metadata is not a schema error.
user is personal-data metadata, not the canonical user profile.
Empty history does not explain current eligibility; read current state separately.

Next steps#

For the complete current-state and history workflow, see Mini-game State and History.
1.
Read current state with Get current mini-game and streak state.
2.
Read page 1 here and identify the relevant gameName.
3.
Follow spin-earned -> spin-used or spin-expired, and compare UTC timestamps.
4.
Paginate only if the relevant period is older than page 1.
5.
Use a separate business-data source to explain why a mission was or was not completed; this endpoint reports events, not the full eligibility calculation.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Logs fetched. The list may be empty.
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠404Error
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.returning.ai/v1/mini-game-logs/by-email' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "member@example.com",
  "limit": 20,
  "page": 1
}'
Response Response Example
200 - Success Example
{
  "status": "success",
  "message": "Mini game logs fetched successfully",
  "data": {
    "logs": [
      {
        "_id": "64b000000000000000000101",
        "communityId": "64b000000000000000000001",
        "miniGameId": "64b000000000000000000010",
        "userId": "64b000000000000000000100",
        "miniGameType": "spin_the_wheel",
        "gameName": "Weekly rewards wheel",
        "action": "spin-earned",
        "missionName": "Complete the weekly activity",
        "missionTimeframe": "weekly",
        "spinInventoryId": "64b000000000000000000201",
        "spinCount": 1,
        "expiresAt": "2026-08-24T23:59:59.999Z",
        "createdAt": "2026-08-18T09:15:00.000Z",
        "updatedAt": "2026-08-18T09:15:00.000Z"
      }
    ],
    "pagination": {
      "total": 1,
      "page": 1,
      "limit": 10,
      "totalPages": 1
    }
  }
}
Modified at 2026-08-17 18:44:32
Previous
Manage User Account
Next
Get current mini-game and streak state
Built with