1. Gamification
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 user's current Mini Games and Streak stats
      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
      • Get referral programs
      • Get user's referral summary
    • Rolling Data
      • Get Daily Calculation Data
      • Get Rolling Calculation Data
    • Match Predictions
    • Get tiers and XP settings
      GET
    • Get daily user gamification history
      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. Gamification

Search user gamification logs

POST
/v1/gamifications/logs

What this endpoint does#

Returns a read-only, paginated event history for one user in the community associated with the Bearer API key. Supply the user’s Returning.AI client ID or email address. The endpoint does not search the whole community and does not change XP, coins, users, or events.
Use it to investigate how a user earned or spent loyalty value, audit event processing, and reconcile user-level gamification activity.
INFO
Scope
The API key determines the community automatically. The user value is resolved only inside that community. Do not send a community ID.

Quick start#

Authentication and permission#

Use a community API key in the Authorization header:
The key must be active, scoped to the intended community, and include the getUserStats permission. Missing, invalid, expired, or under-permissioned keys currently return HTTP 401.

Request body#

Only user is required. Send a JSON body; there are no query or multipart parameters.
FieldRequiredMeaning
userYesUser email or Returning.AI client ID, as a non-empty string. Resolution is limited to the API key’s community.
dateNoUTC calendar-date filter using gt, gte, lt, or lte with YYYY-MM-DD values.
timeNoUTC time-of-day filter using gt, gte, lt, or lte with zero-padded HH:mm values.
actionNoArray of exact action labels. A row matches when its action is in the array.
limitNoRows per page. Defaults to 100; minimum 1, maximum 100.
pageNo1-based page number. Defaults to 1.

Filter behavior#

date.gte and date.lte include the named UTC calendar dates.
date.gt and date.lt exclude the named UTC calendar dates.
time comparisons use the event’s UTC HH:mm value.
Date and time filters can be one-sided; you do not need to send both bounds.
Multiple action values are combined with OR semantics.
Omit a filter object rather than sending unsupported keys.

Success and pagination#

HTTP 200 returns status: "success", pagination under data.pagination, and event rows under data.data.
Rows are returned newest stored log first using descending log ID. Follow hasNextPage or increment page until it becomes false. A valid search with no matching events is successful and returns data.data: [], total: 0, and totalPages: 0.

Event fields#

FieldMeaning
_idStable gamification-log identifier. Use it when deduplicating paginated exports.
emailResolved user email. Treat it as personal data.
actionHuman-readable event action when available. Older events may omit it.
action_detailsAdditional event detail when available; otherwise null.
xpXP delta recorded by the event when available. Positive and negative values are possible.
currencyLoyalty-coin delta recorded by the event. Positive and negative values are possible.
dateEvent date in UTC, formatted YYYY-MM-DD.
timeEvent time in UTC, formatted HH:mm.

Errors and recovery#

HTTPMeaningWhat to do
400Missing user, invalid pagination, or invalid request shape.Correct the JSON body. Keep page >= 1 and 1 <= limit <= 100.
401Missing, invalid, expired, or under-permissioned API key.Replace or update the key and confirm getUserStats. Do not retry unchanged credentials.
404The supplied user does not exist in the API key’s community.Verify the email/client ID and that the key belongs to the intended community.
500Unexpected service error.Retry with bounded backoff; contact Returning.AI support if it persists.
TIP
Retry safety
This is a read-only endpoint, so an exact retry is safe. New events can arrive while paging; use _id to deduplicate and do not treat page numbers as an immutable snapshot.
Historical event caveat

Privacy#

The response contains user identity and detailed activity history. Store it only where authorized, avoid logging full responses, and redact it from support tickets and shared debugging output.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Returns a populated or empty page of one user’s gamification events.
Bodyapplication/json

🟠400Invalid Request
🟠401Authentication or Permission Error
🟠404User Not Found
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.returning.ai/v1/gamifications/logs' \
--header 'Authorization: Bearer <COMMUNITY_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "user": "client@example.com",
  "limit": 100,
  "page": 1
}'
Response Response Example
200 - Populated page
Synthetic example; no live client data.
{
  "status": "success",
  "data": {
    "pagination": {
      "total": 3,
      "currentPage": 1,
      "totalPages": 1,
      "hasNextPage": false,
      "hasPrevPage": false
    },
    "data": [
      {
        "_id": "66c2f2a7b83b0b1234567890",
        "email": "client@example.com",
        "action": "Send message",
        "action_details": "Posted a message in a community channel",
        "xp": 20,
        "currency": 5,
        "date": "2026-08-17",
        "time": "09:30"
      }
    ]
  }
}
Modified at 2026-08-17 09:12:14
Previous
Get daily user gamification history
Next
Get user activity stats
Built with