Moderate a Specific User
This endpoint performs users moderation
info
This operation requires moderation role.
HTTP Request
PATCH /api/v2/moderation/user/{id}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this user |
status | body | string | true | Valid values are: a, b, d, u |
days_blocked | body | string | false | Number of days of block. If not passed the block will be forever (status must be "b") |
hard | body | integer | false | If the value is 1 and status is "d" it will perform an hard deletion (equivalent to status "u") |
Example Body Parameters
- JSON
{
"status": "string"
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"status": "string"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/moderation/user/{id}/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X PATCH /api/v2/moderation/user/{id}/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Response status code | None |