Creating Categories
Adding a new Category to your Project.
The following call will create a new Category called "Test Category", with subcategories "Example Subcategory 1" and "Example Subcategory 2" in the Project with the id 1998159537
:
(Click here to learn how to get your Project ID)
curl -X POST \
'https://api.brandwatch.com/projects/1998159537/categories/' \
-H 'content-type: application/json' \
-d '{"name":"Test Category","children":[{"name":"Example Subcategory 1","id":""},{"name":"Example Subcategory 2"}],"multiple":true}'
This will upload a Category into your account, and return a response similar to the following:
{
"id": 4047196,
"name": "Test Category",
"multiple": true,
"children": [
{
"id": 4047197,
"name": "Example Subcategory 1",
"ordering": 1
},
{
"id": 4047198,
"name": "Example Subcategory 2",
"ordering": 2
}
]
}
Here, the "Test Category" Category with ID 4047196
has two Subcategories, as identified in the children
array.
You can now use these Category and Subcategory IDs when filtering or breaking down Mention calls. Elsewhere in the documentation you may see the top-level Categories being referred to as "Parent Categories".
Updated almost 6 years ago