Add a Tag
This endpoint adds a tag to a user or to a category or to a contribution.
info
This operation requires an admin role.
note
If the specified object already has this tag associated, the operation is a no-op: nothing changes, and the API still returns 204 No Content (no error).
HTTP Request
POST /api/v2/tag/{id}/add/
Parameters
| Name | In | Type | Required | Description | 
|---|---|---|---|---|
| id | path | string | true | A unique integer value identifying this tag | 
| user | body | integer | false | A unique integer value identifying the user | 
| category | body | integer | false | A unique integer value identifying the category | 
| contribution | body | integer | false | A unique integer value identifying the contribution | 
One between "user", "category" and "contribution" needs to be passed to this endpoint.
Example Request
- JavaScript
- Bash
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}/add/',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
# You can also use wget
curl -X POST /api/v2/tag/{id}/add/ \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json'
  -H 'Authorization: Bearer {access_token}'
  --DATA '{"user": integer}'
Responses
| Status | Meaning | Description | Schema | 
|---|---|---|---|
| 204 | No Content | Response status code | None |