Skip to main content

Moderate a Specific User

This endpoint performs users moderation

info

This operation requires moderation role.

HTTP Request

PATCH /api/v2/moderation/user/{id}/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this user
statusbodystringtrueValid values are: a, b, d, u
days_blockedbodystringfalseNumber of days of block. If not passed the block will be forever (status must be "b")
hardbodyintegerfalseIf the value is 1 and status is "d" it will perform an hard deletion (equivalent to status "u")

Example Body Parameters

{
"status": "string"
}

Example Request

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);
});


Responses

StatusMeaningDescriptionSchema
204No ContentResponse status codeNone