1. User Fields
Returning.AI
  • Getting Started
  • Bulk Operations
    • List bulk update jobs
      GET
    • Get bulk update job status
      GET
    • Get bulk update job details
      GET
    • Bulk update users from CSV
      POST
    • Bulk update premium currency from CSV
      POST
  • Chart Analysis
    • Create Analysis
      POST
    • Get Analysis
      GET
    • Update Analysis
      PATCH
    • Delete Analysis
      DELETE
    • List Analyses
      GET
    • Append Drawings
      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
  • 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 daily user gamification history
    • List user gamification logs
    • Get user activity stats
  • 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
    • Send Message
    • Reply Message
    • React Message
    • Upload message images
  • Users
    • Get user
    • Get Users with Filters
    • Create New User
    • Get User Data
    • Manage User Account
    • List mini-game logs by user email
    • Get user's current Mini Games and Streak stats
    • Get User Milestones
    • Update User Data, Identifier, And Roles
  • Authentication
    • Register user with password
    • Verify user email
    • Log in user with password
    • Secure Auth
  • 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
  • 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 Analytics
    • Get Loyalty Overview
    • Get Phone Verification Contacts
  • 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
      • List Community User-Field History
      • List One Field Across Users
      • List One User Across Fields
      • List One User's One Field
      • Update A User Field Value
      • Deprecated Field-First History Write
      • Deprecated Field-First History Read
    • Create A User Field Definition
      POST
    • Get Specific User Field
      GET
    • Update Custom User Field
      PUT
    • Delete Custom User Field
      DELETE
    • Get all user fields for a community
      GET
    • Delete user field
      DELETE
    • Update user field
      PUT
    • Get specific user field
      GET
  • 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. User Fields

Create A User Field Definition

POST
/v1/communities/{communityId}/user-fields
Create a typed field definition. The stable field key is immutable and recommended for integrations.
All nine definition types are supported. Select definitions can be created, but writing select values through the history mutation API is not supported yet. Typed defaults are strict: numerical values must be JSON numbers, booleans must be JSON booleans, and an empty string is valid only for multi-line text.
Exact replays with the same community-scoped Idempotency-Key return the original 201. A different payload with that key returns 409 IDEMPOTENCY_KEY_CONFLICT.

Request

Path Params

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
User field created successfully. Branch on the HTTP status and meta.code; do not branch on the human-readable message.
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🟠409
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://sgtr-api.returning.ai/v1/communities//user-fields' \
--header 'Authorization;' \
--header 'Idempotency-Key;' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Trading Volume",
    "field": "trading_volume",
    "type": "numerical",
    "defaultValue": 0
}'
Response Response Example
201 - Success Example
{
    "meta": {
        "status": "success",
        "statusCode": 201,
        "code": "USER_FIELD_CREATED",
        "compatibilityEvent": "attempted"
    },
    "message": "User field created successfully.",
    "data": {
        "_id": "66f000000000000000000010",
        "communityID": "6502c9e514a3e564c5c09c0a",
        "name": "Trading Volume",
        "field": "trading_volume",
        "type": "numerical",
        "defaultValue": 0
    }
}
Modified at 2026-07-20 19:36:15
Previous
Deprecated Field-First History Read
Next
Get Specific User Field
Built with