This endpoint creates a new custom field for a community.Authorization#
Found in the platform under community settings > API keys.
Permission: User FieldsCommunity ID is needed in the path.Found in the platform under community settings > Appearance.Body#
field: the database name for the field, when spaces are added, a hypen will be automatically added.
ie: "deposit amount" -> "deposit-amount"
name: the display name of the field
type: the type of the field. List of available types: 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": "numerical"
}
Request Code Samples
curl --location --request POST 'https://application.returning.ai/apis/v1/communities//user-fields' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"field": "userLevel",
"name": "User Level",
"type": "numerical"
}'
Responses
application/json
Create user field successful
{
"meta": {
"status": "success",
"statusCode": 201
},
"message": "Create user field successful",
"data": {
"_id": "6857de260f3c24d98fd7ca85",
"name": "User Level",
"type": "numerical",
"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-09-17 09:10:34