Skip to content

Add content restriction

POST
/api/v1/users/{userId}/content-restrictions
curl --request POST \
--url http://127.0.0.1:58259/api/v1/users/1/content-restrictions \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "userId": 1, "restrictionType": "CATEGORY", "mode": "EXCLUDE", "value": "example", "createdAt": "2026-04-15T12:00:00Z" }'

Add a new content restriction for a user

userId
required
integer format: int64

ID of the user

Media type application/json

Content restriction to add

object
id
integer format: int64
userId
integer format: int64
restrictionType
string
Allowed values: CATEGORY TAG MOOD AGE_RATING CONTENT_RATING
mode
string
Allowed values: EXCLUDE ALLOW_ONLY
value
string
createdAt
string format: date-time

Content restriction created successfully

Media type */*

Content restriction to add

object
id
integer format: int64
userId
integer format: int64
restrictionType
string
Allowed values: CATEGORY TAG MOOD AGE_RATING CONTENT_RATING
mode
string
Allowed values: EXCLUDE ALLOW_ONLY
value
string
createdAt
string format: date-time

Invalid request or restriction already exists

Media type */*

Content restriction to add

object
id
integer format: int64
userId
integer format: int64
restrictionType
string
Allowed values: CATEGORY TAG MOOD AGE_RATING CONTENT_RATING
mode
string
Allowed values: EXCLUDE ALLOW_ONLY
value
string
createdAt
string format: date-time

Forbidden - requires admin

Media type */*

Content restriction to add

object
id
integer format: int64
userId
integer format: int64
restrictionType
string
Allowed values: CATEGORY TAG MOOD AGE_RATING CONTENT_RATING
mode
string
Allowed values: EXCLUDE ALLOW_ONLY
value
string
createdAt
string format: date-time

User not found

Media type */*

Content restriction to add

object
id
integer format: int64
userId
integer format: int64
restrictionType
string
Allowed values: CATEGORY TAG MOOD AGE_RATING CONTENT_RATING
mode
string
Allowed values: EXCLUDE ALLOW_ONLY
value
string
createdAt
string format: date-time