List mini-game logs by user email
List one trader's spin-the-wheel history in your community, newest first, one page at a time.
- Method
- POST
- Path
https://api.returning.ai / v1/ mini-game-logs/ by-email - Permission
- customerSuccess
- Retries
- Read-only; exact retries are safe
When to use this
- A trader says a spin disappeared, and support needs to see when it was earned, used or expired.
- Check how a trader's wheel streak grew or broke, and which prize each spin paid.
- Confirm that a spin or streak correction was recorded.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- customerSuccessShown in the dashboard as “Customer Success”
Use a Community API key with customerSuccess, shown in the dashboard as Customer Success, and keep it on your server. The key decides the community: you only see entries from your own community. Entries can include a trader's email and prize claim details, so never call this endpoint from a browser or app.
Behaviour#
This read changes nothing. Each event writes one entry, so a trader's history reads as a timeline: a spin-earned entry is later followed by spin-used or spin-expired with the same spinInventoryId. Fields depend on action, so don't expect every field on every entry.
New events push older entries down while you page. To copy history, start at page 1 and use _id to skip entries you already have.
Request#
Headers#
Body#
Send the trader's email. The email lookup isn't limited to your community: an email that belongs to someone outside your community returns 200 with an empty list, not 404. limit and page also accept numbers sent as strings.
curl --request POST \
--url https://api.returning.ai/v1/mini-game-logs/by-email \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"email": "trader@example.com",
"limit": 20,
"page": 1
}'
Response#
A 200 returns the page in data.logs and the totals in data.pagination. An empty data.logs means the trader has no mini-game history in your community. It says nothing about whether they can spin now; read Get mini-game and streak state for that. This endpoint has no top-level code; branch on the HTTP status.
Rulesuccess
RuleMini game logs fetched successfully
Eg{ ... }
Eg[ ... ]
Rule^[a-fA-F0-9]{24}$
Eg"66f000000000000000000701"
RuleDate-time
Eg"2026-09-26T08:30:00.000Z"
spin-earned, spin-used, spin-expired, spin-claimed, mission-progress, streak-earned, streak-broken, admin-updated, or a quiz-... value. Communities with raffles also see raffle-... values. Ignore values you don't recognise.Eg"spin-earned"
Complete 3 trades Completed, Prize earned: 50 XP 10 Coins, streak: 4 days or Streak broken. Wording can change; don't parse it.Eg"Complete 3 trades Completed"
spin_the_wheel or quiz, or raffle in communities with raffles.Eg"spin_the_wheel"
Eg"Daily Spin the Wheel"
Rule^[a-fA-F0-9]{24}$
Eg"66f000000000000000000702"
RuleDecimal digits
Eg"3247779"
id, username, displayName, avatar and email when the entry was written. Personal data: match on userId instead, and don't store it.Eg{ ... }
Rule^[a-fA-F0-9]{24}$
Eg"66f000000000000000000010"
spin-earned and mission-progress entries.Eg"66f000000000000000000704"
Eg"Complete 3 trades"
Ruledaily, weekly or monthly
Eg"daily"
Eg1
RuleDate-time
Eg"2026-09-26T23:59:59.999Z"
spin-expired entries.RuleDate-time
Eg"2026-08-26T09:30:00.000Z"
xp and currency (coins). On spin-used and spin-claimed entries.Eg{}
Eg25
Eg10
xp and currency (coins).Eg{}
Eg25
Eg10
Eg2
Eg2
0 on streak-broken.Eg3
daily, weekly or monthly.streak-earned entries.Eg5
admin-updated entries that changed spins.admin-updated correction. Corrections made through the API show username API Admin.spin-earned entry with the later spin-used or spin-expired entry.Rule^[a-fA-F0-9]{24}$
Eg"66f000000000000000000703"
RuleDate-time
Eg"2026-09-26T08:30:00.000Z"
Eg["profile_completed"]
Eg"64b000000000000000000701"
Eg[{"action": "profile_completed"}]
spin-claimed entries. Personal data.Eg[{"field": "segment", "value": "starter"}]
spin-used and spin-claimed entries.Rule^[a-fA-F0-9]{24}$
Eg"64b000000000000000000501"
Eg{"total": 1, "page": 1, "limit": 20, "totalPages": 1}
RuleMin 0
Eg1
RuleMin 1
Eg1
Rule1-100
Eg20
limit. 0 when there are no entries.RuleMin 0
Eg1
{
"status": "success",
"message": "Mini game logs fetched successfully",
"data": {
"logs": [
{
"_id": "66f000000000000000000701",
"communityId": "66f000000000000000000010",
"miniGameId": "66f000000000000000000702",
"userId": "3247779",
"user": {
"id": "3247779",
"username": "sample_trader",
"displayName": "Sample Trader",
"avatar": "",
"email": "trader@example.com"
},
"gameName": "Daily Spin the Wheel",
"miniGameType": "spin_the_wheel",
"action": "spin-earned",
"actionDetails": "Complete 3 trades Completed",
"missionId": "66f000000000000000000704",
"missionName": "Complete 3 trades",
"missionTimeframe": "daily",
"spinInventoryId": "66f000000000000000000703",
"spinCount": 1,
"expiresAt": "2026-09-26T23:59:59.999Z",
"createdAt": "2026-09-26T08:30:00.000Z",
"updatedAt": "2026-09-26T08:30:00.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
}
Errors#
Errors on this endpoint have no machine-readable code; branch on the HTTP status. A key without customerSuccess gets 401, not 403, with only a message. A validation 400 names the field in detail.
Fix the request02
email is missing or isn't an email, limit is outside 1-100, or page is below 1. detail names each field. Correct it and send again.customerSuccess (message is then Your api key does not have permission to access this action). Send Authorization: Bearer <API_KEY> with a current Community API key, and add Customer Success in Settings > Integration > API Keys.Fix the data01
200 with an empty list, not 404.Retry with backoff01
Authentication failed). Retry the same request with exponential backoff.{
"meta": {
"status": "error",
"statusCode": 400
},
"message": "Get mini game logs by email endpoint validation error.",
"detail": {
"limit": "Number must be less than or equal to 100"
},
"solution": "Check your body in request and try again"
}