Creates a new user field for a community.Bearer token authentication required
Only community owners and administrators can access this endpoint
User must have either COMMUNITY_OWNER
or COMMUNITY_ADMIN
permissions for the specified community
Community API key with userFields
permission can also be used
Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
{
"field": "userLevel",
"name": "User Level",
"type": "number"
}
Request Code Samples
curl --location --request POST 'https://application.returning.ai/apis/v1/communities//user-fields' \
--header 'Content-Type: application/json' \
--data-raw '{
"field": "userLevel",
"name": "User Level",
"type": "number"
}'
Responses
application/json
Create user field successful
{
"meta": {
"status": "success",
"statusCode": 201
},
"message": "Create user field successful",
"data": {
"_id": "6857de260f3c24d98fd7ca85",
"name": "User Level",
"type": "number",
"creator": {
"_id": "61100af5c548eb5c7ebc7819",
"id": 123456789,
"avatar": "https://returning-ai.com/avatar.png",
"displayName": "Admin",
"username": "admin"
},
"communityId": "6167dba9c548eb5c7ec28057",
"createdAt": "2025-06-22T11:28:50.301Z",
"updatedAt": "2025-06-22T11:28:50.301Z"
}
}
Modified at 2025-08-28 10:34:46