Update a tag
PUT /accounts/{account_id}/alerts/{alert_id}/tags/{tag_id}
Modifies an existing tag, in order to change the label.
Parameters
account_id
(string) - Id of the accountalert_id
(number) - Id of the alerttag_id
(number) - Id of the tag
Page content
Minimal curl example
curl -ig 'https://api.mention.net/api/accounts/{account_id}/alerts/{alert_id}/tags/{tag_id}' \
-X PUT \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: 1.19' \
-d '{"id": , "name":"space new technos"}'
Available properties
Available properties
Properties | Definition | Example |
---|---|---|
name | the label of the tag | "space innovation" |
keywords | array of keywords used for auto-tagging | ["space innovation", "nasa"] |
Name
name
The label of the tag. It's size is limited to 20 characters.
Keywords
keywords
The list of keywords used for auto-tagging. Any new mention containing these keywords will automatically tagged. A tag can have a maximum of 5 keywords.
Request example
- Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept-Version: 1.19
- Body
{
"name": "space new technos"
}
Response example
If the request was successful, the response will return the full tag data, just as if you did a GET request on tags of this alert.
- Body
{
"tag": { ...tag...}
}
Where tag
's value is a json object with the full tag data:
{
"id": 46468,
"name": "space innovation",
"mention_count": 0,
"keywords": ["space"]
}
Id
id
The id given to the tag. This is the unique identifier of the tag. If you change the label (name
) of the tag later, all mentions tagged with it will keep the same tags, as they are linked to the tag by its id, not its name.
Name
name
The human-readable label given to the tag.
Mention count
mention_count
The number of mentions with that tag.
Keywords
keywords
The list of keywords used for auto-tagging. Any new mention containing these keywords will automatically tagged. A tag can have a maximum of 5 keywords.