Authorization headerstore permissioncommunityID401 if the key is missing, invalid, expired, or lacks access409name is required and must be non-emptyviewType is optional and must be full or preview; the default is fulldisplayOrder is optional and must be an integer greater than or equal to 0roleNames, tagNames, usernames, and defaultPurchaseStatusName in partner-facing requestscommunityID; it is resolved from the API keyroles, tags, and users as string arrays only; backend-internal IDs are not returnedcombination[].valuesdefaultPurchaseStatus is returned as a status name string or null, never as an objecti18n controls category name translations and defaults to disabled with an empty translation list// Creates a category using readable role, tag, user, and purchase-status names.
{
"name": "Premium Rewards",
"coverImage": "https://example.com/category.png",
"shouldShowCover": true,
"isArchived": false,
"viewType": "full",
"displayOrder": 0,
"categoryPermission": [
{
"type": "role",
"permission": {
"roleNames": [
"VIP Member"
],
"tagNames": [
"Early Access"
],
"usernames": [
"alex"
],
"combination": [],
"isSelectAll": false
},
"purchaseLimit": {
"isEnabled": true,
"quantity": 1,
"intervalCount": 1,
"intervalUnit": "months"
},
"accessLevel": "full-access",
"isEnabled": true
}
],
"defaultPurchaseStatusName": "Pending",
"i18n": {
"isTranslationEnabled": false,
"nameTranslations": []
}
}curl --location 'https://adss-integration.returning.ai/apis/categories' \
--header 'Authorization: Bearer XXXXXX' \
--header 'Content-Type: application/json' \
--data '{
"name": "Premium Rewards",
"coverImage": "https://example.com/category.png",
"shouldShowCover": true,
"isArchived": false,
"viewType": "full",
"displayOrder": 0,
"categoryPermission": [
{
"type": "role",
"permission": {
"roleNames": [
"VIP Member"
],
"tagNames": [
"Early Access"
],
"usernames": [
"alex"
],
"combination": [],
"isSelectAll": false
},
"purchaseLimit": {
"isEnabled": true,
"quantity": 1,
"intervalCount": 1,
"intervalUnit": "months"
},
"accessLevel": "full-access",
"isEnabled": true
}
],
"defaultPurchaseStatusName": "Pending",
"i18n": {
"isTranslationEnabled": false,
"nameTranslations": []
}
}'{
"meta": {
"status": "success",
"statusCode": 201
},
"message": "Create category success.",
"data": {
"_id": "67bc22b591b5284096627c6c",
"communityID": "6502c97314a3e564c5bbfa84",
"name": "Premium Rewards",
"coverImage": "https://example.com/category.png",
"shouldShowCover": true,
"isArchived": false,
"viewType": "full",
"displayOrder": 0,
"categoryPermission": [
{
"type": "role",
"permission": {
"roles": [
"VIP Member"
],
"tags": [
"Early Access"
],
"users": [
"alex"
],
"combination": [],
"isSelectAll": false
},
"purchaseLimit": {
"isEnabled": true,
"quantity": 1,
"intervalCount": 1,
"intervalUnit": "months"
},
"accessLevel": "full-access",
"isEnabled": true
}
],
"defaultPurchaseStatus": "Pending",
"i18n": {
"isTranslationEnabled": false,
"nameTranslations": []
},
"createdAt": "2025-02-24T07:41:41.053Z",
"updatedAt": "2026-05-25T05:15:38.547Z"
}
}