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 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
    • 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
      PUT
    • List redemption orders by user email
      POST
    • List redemption statuses
      POST
    • Get redemption status by ID
      POST
    • List redemption orders by community
      POST
    • Create redemption order status
      POST
    • Get redemption order status history
      POST
  • 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
      • 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
  • 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
  • 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
    • 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
      • 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
  • 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 User Data

POST
/v1/users/info

What this endpoint does#

Returns one active user from the API key's community. Use it after Create User or Update User Data, before user-field writes, and when support or a broker sync needs the current profile, roles, balances, and selected custom fields. Missing, inactive, and out-of-community identities intentionally share the same privacy-safe 404 USER_NOT_FOUND response.
INFO
Workflow
User identifier -> current user data

Quick start#

{
  "idOrEmail": "user@example.com",
  "customFields": ["customerid", "trading_volume"]
}

Authentication and permission#

Use a server-side Community API key with getUserData. The key limits the lookup to its own community. Do not broaden the search after a privacy-safe 404 or expose whether the same identity exists elsewhere.

Complete examples#

Lookup by email:
{ "idOrEmail": "user@example.com" }
Lookup by numeric Returning.AI platform ID:
{ "idOrEmail": "3247779" }
Legacy structured platform-ID lookup:
{ "identifier": { "key": "id", "value": "3247779" } }
Configured custom identifier lookup:
{ "identifier": { "key": "customerid", "value": "<brokerCustomerId>" } }
customFields is an optional allowlist of field keys to return. Prefer email or numeric platform ID for the most portable lookup. A custom identifier works only when that identifier is active and its projection is ready.

Success and readback#

{
  "status": "success",
  "code": "USER_DATA_RETRIEVED",
  "message": "User data retrieved successfully",
  "data": {
    "_id": "<mongoUserId>",
    "userId": "3247779",
    "username": "ada_lovelace_123",
    "xp": 0,
    "coins": 0,
    "roles": ["@all"],
    "highestRole": "@all",
    "customFields": {
      "customerid": "<brokerCustomerId>"
    }
  }
}
Additional profile, tier, language, streak, and activity fields may be present. Treat data.userId as an opaque decimal string. For post-write verification, compare the returned identifier, roles, profile values, and requested custom fields with the preceding mutation.
CHECK
Readback
This response is the readback. Save the returned identifiers if another call follows.

Errors and recovery#

400 CUSTOM_FIELD_IDENTIFIER_NOT_FOUND: the supplied structured key is not an active custom identifier. Correct the key or use email/platform ID.
401 AUTHENTICATION_REQUIRED: the key is missing, malformed, invalid, or expired.
403 API_KEY_PERMISSION_DENIED: the key is valid but lacks getUserData.
404 USER_NOT_FOUND: no active user is visible to this community. Do not probe other communities or leak existence.
503 CUSTOM_FIELD_IDENTIFIER_NOT_READY: the configured custom-field lookup projection is unavailable. Use email/platform ID when possible or retry later with bounded backoff.
500 USER_DATA_RETRIEVAL_FAILED: preserve the request identifiers and correlation time for support; the request is read-only.

Retry safety#

TIP
Retry rule
This endpoint is read-only, so an exact retry is safe after a transient transport error or 5xx. Use bounded exponential backoff. Do not change identifiers between retries because that turns one read into a broader identity probe.

Gotchas#

Avoid this mistake

Next steps#

Update the user
Use the returned userId or email with POST /v1/users/update. For one field's audit trail, call GET /v1/communities/{communityId}/users/{userId}/user-fields/{fieldIdOrName}/histories. For current profile or balances, this response is the authoritative readback.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
User data retrieved successfully Branch on the HTTP status and top-level code; do not branch on the human-readable message.
Bodyapplication/json

🟠400Error
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🟠409Record Not Found
🔴500Server Error
🔴503Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.returning.ai/v1/users/info' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "idOrEmail": "user@example.com",
  "customFields": [
    "customerid"
  ]
}'
Response Response Example
200 - Success Example
{
  "status": "success",
  "code": "USER_DATA_RETRIEVED",
  "message": "User data retrieved successfully",
  "data": {
    "_id": "<mongoUserId>",
    "userId": "3247779",
    "username": "ada_lovelace_123",
    "xp": 0,
    "coins": 0,
    "roles": [
      "@all"
    ],
    "highestRole": "@all",
    "customFields": {
      "customerid": "<brokerCustomerId>"
    }
  }
}
Modified at 2026-07-27 16:00:18
Previous
Create New User
Next
Manage User Account
Built with