Skip to main content

Flag a Specific Post

This endpoint flags a specific post

info

This operation requires authentication.

HTTP Request

POST /api/v2/post/{id}/flag/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this post
flag_typebodyintegertrueA integer from 0 to 4

Enumerated Values

ParameterValueDescription
flag_type0spam
flag_type1aggressive
flag_type2vulgar
flag_type3poor
flag_type4offtopic

Example Body Parameters

{
"flag_type": "integer"
}

Example Request

const inputBody = '{
"flag_type": "integer"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/post/{id}/flag/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
204No ContentResponse status codeNone