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 |
---|---|---|
sentiment | Change the sentiment of a Mention | "positive", "negative", "neutral" |
addTag | Add a Tag to a Mention | list of Tag names (strings) |
removeTag | Remove a Tag from a Mention | list of Tag names (strings) |
addCategories | Add a Category to a Mention | list of Category IDs (ints) (Click here to learn how to retrieve your Category ID.) |
removeCategories | Remove a Category from a Mention | list of Category IDs (ints) (Click here to learn how to retrieve your Category ID.) |
priority | Add or change the Priority of a Mention | "high", "medium", "low" |
removePriority | Remove the Priority from a Mention | "high", "medium", "low" |
status | Add or change the Status of a Mention | "open", "pending", "closed" |
removeStatus | Remove the Status from a Mention | "open", "pending", "closed" |
assignment | Add an Assignment to a Mention | The email address (string) of a User with access to the given Project |
removeAssignment | Remove an Assignment from a Mention | The email address (string) of a User with access to the given Project |
checked | Add or remove Checked from a Mention | TRUE, FALSE |
starred | Add or remove a Star from a Mention | TRUE, FALSE |
location | Change the Location of a Mention | string |
publicationName | Add or change the Publication name of a Mention | string |
author | Add or change the Author of a Mention | string |
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",
"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 4 months ago