Create a tag

POST /accounts/{account_id}/alerts/{alert_id}/tags

Creates a new tag for the alert. This tag will be available for any mention of that alert.

You are currently limited to a maximum of 100 tags / alert.

Tag size is limited to 20 characters maximum.

Parameters

  • account_id (string) - Id of the account
  • alert_id (number) - Id of the alert

Minimal curl example

curl -ig 'https://api.mention.net/api/accounts/{account_id}/alerts/{alert_id}/tags' \
    -X POST \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -H 'Accept-Version: 1.19' \
    -d '{"name":"space innovation"}'

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 innovation"
}

Response example

  • Body
{ 
    "tag": { ...tag...} 
}

Where {...tag...} is a full tag object of the form:

{
    "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.