Tag Categories
List, create, update, and delete tag categories.
Tag categories group related tags for your team. The endpoints below cover listing, creating, updating, and deleting them. To manage the tags themselves, see Creating and Updating Tags.
| Endpoint | Purpose |
|---|---|
GET /v1/teams/{teamId}/tagcategories | List tag categories |
POST /v1/teams/{teamId}/tagcategories | Create a tag category |
PUT /v1/teams/{teamId}/tagcategories/{tagCategoryId} | Update a tag category |
DELETE /v1/teams/{teamId}/tagcategories/{tagCategoryId} | Delete a tag category |
In every endpoint, teamId is the ID of the team, in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
List tag categories
curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/teams/{teamId}/tagcategoriesResponse
An array of tag categories, each with its id, name, and whether it is the collection's defaultCategory, plus an array of the tags in that category.
[
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dateCreated": "2016-01-01T00:00:00.000+0000",
"createdBy": {
"email": "[email protected]"
},
"defaultCategory": true,
"name": "Fruits",
"tags": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value": "Apple"
},
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value": "Banana"
}
]
},
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dateCreated": "2016-01-01T00:00:00.000+0000",
"createdBy": {
"email": "[email protected]"
},
"name": "Colors",
"tags": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value": "Orange"
}
]
}
]Create a tag category
One field is required:
| Field | Description |
|---|---|
name | The name of the tag category. Required. |
Request
curl -X POST https://api.getguru.com/api/v1/teams/{teamId}/tagcategories \
-u $GURU_USER:$GURU_TOKEN \
-H "Content-Type: application/json" \
-d '{
"name": "My Tag Category"
}'Response
The id and name of the tag category that was created:
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My Tag Category"
}Update a tag category
tagCategoryId in the URL is the ID of the tag category to update. One field is required:
| Field | Description |
|---|---|
name | The name of the tag category. Required. |
Request
curl -X PUT https://api.getguru.com/api/v1/teams/{teamId}/tagcategories/{tagCategoryId} \
-u $GURU_USER:$GURU_TOKEN \
-H "Content-Type: application/json" \
-d '{
"name": "My Updated Tag Category"
}'Response
The id and name of the tag category that was updated:
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My Updated Tag Category"
}Delete a tag category
tagCategoryId in the URL is the ID of the tag category to delete. There is no request or response body; a successful delete returns HTTP status 204.
curl -X DELETE https://api.getguru.com/api/v1/teams/{teamId}/tagcategories/{tagCategoryId} \
-u $GURU_USER:$GURU_TOKENUpdated 9 days ago

