Editing Mentions
Mention metadata can be edited within the Brandwatch Consumer Research platform, either one by one or in bulk.
One this page we will show you:
Options for Editing Mention Metadata
Through the API you can edit mention sentiment, add or remove categories/tags, change workflow, or edit the location of a mention. For a full list of options, including the appropriate parameters and accepted values, see below:
Parameter | Description | Accepted Values | Example JSON |
---|---|---|---|
sentiment | Change the sentiment of a Mention | "positive", "negative", "neutral" | "sentiment": "positive" |
addTag | Add a Tag to a Mention | list of Tag names (strings) | "addTag": ["shoes"] |
removeTag | Remove a Tag from a Mention | list of Tag names (strings) | "removeTag": ["shoes"] |
addCategories | Add a Category to a Mention | list of Category IDs (ints) (Click here to learn how to retrieve your Category ID.) | "addCategories": [35] |
removeCategories | Remove a Category from a Mention | list of Category IDs (ints) (Click here to learn how to retrieve your Category ID.) | "removeCategories": [35] |
priority | Add or change the Priority of a Mention | "high", "medium", "low" | "priority": "high" |
removePriority | Remove the Priority from a Mention | "high", "medium", "low" | "removePriority": "high" |
status | Add or change the Status of a Mention | "open", "pending", "closed" | "status": "open" |
removeStatus | Remove the Status from a Mention | "open", "pending", "closed" | "removeStatus": "open" |
assignment | Add an Assignment to a Mention | The email address (string) of a User with access to the given Project | "assignment": "[email protected]" |
removeAssignment | Remove an Assignment from a Mention | The email address (string) of a User with access to the given Project | "removeAssignment": "[email protected]" |
checked | Add or remove Checked from a Mention | true, false | "checked": true |
starred | Add or remove a Star from a Mention | true, false | "starred": true |
location | Change the Location of a Mention | string of format ("Country Code.Region.City") | "location": "GBR.Greater London.London" |
publicationName | Add or change the Publication name of a Mention Publication names can only be changed on mentions from blogs, broadcasts, forums, news or reviews. | string | "publicationName": "foo" |
author | Add or change the Author of a Mention Author names can only be changed on mentions from blogs, broadcasts, forums, news or reviews. | string | "author": "foo" |
addClassifications | Add one or more Classifications to a Mention — list of classification names | List of string of format("emotions:emotion string" ) | "addClassifications": ["emotions:Anger","emotions:Disgust"] |
removeClassifications | Remove one or more Classifications to a Mention — list of classification names | List of string of format("emotions:emotion string" ) | "removeClassifications": ["emotions:Anger","emotions:Disgust"] |
addCategoryMetrics | Add one or more Category Metrics to a Mention — list of CategoryMetric objects | List of CategoryMetrics (Click here to learn how to retrieve your Category ID.) | "addCategoryMetrics": [{ "categoryIds": [35], "sentiment": "positive", "prominence": 55 }] |
updateCategoryMetrics | Update existing Category Metric on a Mention — List of CategoryMetric objects | Updated CategoryMetric object of the existing CategoryMetric associated with the mention.(Click here to learn how to retrieve your Category ID.) | "updateCategoryMetrics": { "categoryIds": [35], "sentiment": "negative", "prominence": 55 } |
removeCategoryMetrics | Remove one or more existing Category Metric on a Mention — List of CategoryMetric objects | list of lists of Category IDs (ints) of the existing CategoryMetric to be removed from a mention(Click here to learn how to retrieve your Category ID.) | "removeCategoryMetrics": [[35], [38]] |
Example Call - Editing Sentiment
When editing a mention, you will need the appropriate resourceId
and queryId
. Both of these will be included in any mention metadata when you retrieve mentions from Brandwatch. You should also provide the date
(again this is included on the mention metadata). The date
field is not required, but should provide performance benefits. In the future date
will become a required field.
The below call will change the sentiment of two mentions (as identified by their resource IDs) to be positive:
curl -X PATCH \
'https://api.brandwatch.com/projects/1998159493/data/mentions' \
-d '[{"resourceId":"144080165734","queryId":1998534099,"date":"2017-07-03T11:36:38.000+0000","sentiment":"positive"},{"resourceId":"144080226006","queryId":1998534099,"date":"2017-07-03T11:38:00.000+0000","sentiment":"positive"}]'
For brevity, below is one of the two Mentions returned:
{
"accountType": "individual",
"assignment": null,
"author": "charIiehughes",
"authorVerifiedType": null,
"avatarUrl": "https://pbs.twimg.com/profile_images/872927007172173826/TJaS_V5A_normal.jpg",
"categories": [],
"categoryDetails": [],
"checked": false,
"continent": "Europe",
"continentCode": "eu",
"country": "United Kingdom",
"countryCode": "uk",
"region": null,
"regionCode": null,
"date": "2017-07-03T11:36:38.000+0000",
"dailyVisitors": 1973,
"displayUrls": [],
"domain": "twitter.com",
"expandedUrls": [],
"facebookAuthorId": null,
"facebookComments": 0,
"facebookLikes": 0,
"facebookRole": null,
"facebookShares": 0,
"facebookSubtype": null,
"fullname": "Charlie",
"gender": "male",
"id": 144080165734,
"impact": 43,
"impressions": 2257,
"influence": 644,
"insightsHashtag": [],
"insightsMentioned": [],
"instagramCommentCount": 0,
"instagramFollowerCount": 0,
"instagramFollowingCount": 0,
"instagramLikeCount": 0,
"instagramPostCount": 0,
"interest": [],
"language": "en",
"lastAssignmentDate": null,
"latitude": 0,
"location": null,
"author": null,
"publicationName": null,
"longitude": 0,
"matchPositions": [
{
"start": 15,
"text": "cute",
"length": 4
},
{
"start": 24,
"text": "videos",
"length": 6
},
{
"start": 65,
"text": "my",
"length": 2
},
{
"start": 68,
"text": "dog",
"length": 3
},
{
"start": 95,
"text": "cutest",
"length": 6
}
],
"mediaFilter": null,
"mediaUrls": [],
"monthlyVisitors": 6000000000,
"noteIds": [],
"pageType": "twitter",
"priority": null,
"professions": [],
"queryId": 1998534099,
"queryName": "My Cat / Dog",
"reachEstimate": 644,
"replyTo": null,
"resourceId": "144080165734",
"resourceType": "page",
"retweetOf": null,
"sentiment": "positive",
"shortUrls": [],
"snippet": "Whenever I see cute dog videos I feel obliged to go and sit with my dog to remind him he's the cutest",
"starred": false,
"status": null,
"subtype": null,
"tags": [
"Dog"
],
"threadAuthor": null,
"threadCreated": null,
"threadEntryType": "post",
"threadId": "0",
"threadURL": null,
"title": "Charlie (@charIiehughes): Whenever I see cute dog vi ...",
"twitterAuthorId": "799039776",
"twitterFollowers": 2257,
"twitterFollowing": 1920,
"twitterPostCount": 2431,
"twitterReplyCount": 0,
"twitterRetweets": 0,
"twitterRole": null,
"twitterVerified": false,
"url": "http://twitter.com/charIiehughes/statuses/881839094883639296",
}
Updated 8 days ago