1. Users
Returning.AI
  • Getting Started
  • Authentication
    • Register user with password
      POST
    • Verify user email
      POST
    • Log in user with password
      POST
    • Secure Auth
      GET
  • 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
      POST
    • Update User XP and Currency
      POST
  • Messaging
    • Message Actions
      • Direct Channel
        • private DM channel
          • Reply Message
          • Send Message
          • React Message
        • public channel
          • Reply Message
          • Send Message
          • React Message
      • Forum Channel
        • Send Message
        • Reply Message
        • React Message
      • Text Channel
        • Reply Message
        • Send Message
        • React Message
      • Iframe Channel
        • Reply Message
        • Send Message
        • React Message
    • 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
    • Get tiers and XP settings
      GET
    • Get daily user gamification history
      POST
    • List user gamification logs
      POST
    • Get user activity stats
      POST
  • Rewards & Redemptions
    • Update redemption order status
    • 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 purchase history 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
      • Create products in bulk
      • Create product with vouchers
      • Update products in bulk
      • 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
  • 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
      • Create user field history for specific user
      • Create user field history
      • Get user field histories
    • Get Specific User Field
    • Update Custom User Field
    • Create user field
    • Delete Custom User Field
    • Get all user fields for a community
    • Delete user field
    • Update user field
    • Get specific user field
  • 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
  • Legacy
    • Servers
      • Create server
      • List servers
      • Update server metadata
    • Bulk Operations
      • Bulk import users from CSV
    • Badges
      • List badges
      • Create badge
      • Update badge
      • Delete badge
      • Remove badge from user
      • Award badge to user
    • Messaging
      • Reply to message
      • Send message
      • React to message
    • 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
  1. Users

Update User XP and Currency

POST
/v1/users/update-xp-currency
Updates a community member’s XP and/or standard currency.

Authorization#

Requires an API key with the manageUser permission.

User lookup#

Uses the same identifier payload shape as POST /users/update.
platform_user_id — Resolves the user by platform user ID.
email — Resolves the user by email.
username — Resolves the user by username within the community.
custom_user_identifier — Resolves the user through the community’s active identifier.

Request fields#

identifier — Required user lookup object:
type: platform_user_id, username, email, or custom_user_identifier
value: User identifier value
xp — Optional XP mutation.
currency — Optional standard-currency mutation.
At least one of xp or currency is required.
Each mutation contains:
action — add, subtract, or overwrite
value — A finite, non-negative number
overwrite creates an adjustment baseline in the XP or currency history ledger. The API then recalculates and synchronizes the cached balance.

Responses#

200 USER_XP_CURRENCY_UPDATED — XP and/or currency updated successfully.
400 ACTIVE_IDENTIFIER_NOT_CONFIGURED — A custom identifier was requested but the community has no active identifier configured.
404 USER_NOT_FOUND — The selected identifier does not resolve a user.
500 USER_XP_CURRENCY_UPDATE_FAILED — Unexpected lookup or persistence error.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://sgtr-integration.returning.ai/apis/v1/users/update-xp-currency' \
--header 'Content-Type: application/json' \
--data '{
  "identifier": {
    "type": "custom_user_identifier",
    "value": "CUST-100042"
  },
  "xp": {
    "action": "add",
    "value": 25
  },
  "currency": {
    "action": "overwrite",
    "value": 500
  }
}'
Response Response Example
{
    "status": "success",
    "code": "USER_XP_CURRENCY_UPDATED",
    "message": "User XP and currency updated successfully",
    "data": {
      "userId": 42,
      "xp": 125,
      "currency": 500
    }
  }
Modified at 2026-07-22 04:00:18
Previous
Update User Data
Next
Reply Message
Built with