Skip to main content

Assign a Tag

This endpoint assigns a tag to a user or to a category or to a contribution.

info

This operation requires authentication and admin role.

HTTP Request

POST /api/v2/tag/{id}/assign/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this tag
userbodyintegerfalseA unique integer value identifying the user
categorybodyintegerfalseA unique integer value identifying the category
contributionbodyintegerfalseA unique integer value identifying the contribution

One between "user", "category" and "contribution" need to be passed to this endpoint.

Example Request

const inputBody = '{
"user": integer"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

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

Responses

StatusMeaningDescriptionSchema
204No ContentResponse status codeNone