--- title: "Tag" slug: "server-api-kb-tag" updated: 2022-06-16T08:01:09Z published: 2022-06-16T08:01:09Z canonical: "developer.comm100.com/server-api-kb-tag" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Tag ## Tag You need the Manage articles permission to manage tags. - `Tags` - Tags Manage - `GET kb/tags` - [Get the list of Tags](/docs/server-api-kb-tag#get-the-list-of-tags) - `GET kb/tags/{id}` - [Get a single Tag](/docs/server-api-kb-tag#get-a-single-tag) - `POST kb/tags` - [Create a new Tag](/docs/server-api-kb-tag#create-a-new-tag) - `PUT kb/tags/{id}` - [Update the Tag](/docs/server-api-kb-tag#update-the-tag) - `DELETE kb/tags/{id}` - [Remove the Tag](/docs/server-api-kb-tag#remove-the-tag) ### Tag JSON Format Tag is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the tag. | | `name` | string | Name of the tag. | | `kbId` | guid | Id of the knowledage base. | | `createdById` | guid | Id of the agent who modified the tag. | | `createdTime` | datetime | Time when the tag was last modified. | | `articles` | integer | Counts of the article the tag belong to. | ### Get the list of Tags `GET kb/tags` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `kbId` | guid | query | no | Id of the knowledage base. | | `include` | string | query | no | Allowed value is "image". | - #### Response: An array of [Tag](/docs/server-api-kb-tag#tag-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/kb/tags \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432", "name": "customize", "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc", "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f", "createdTime": "2021-05-08T05:51:31.123Z", "articles": 5 } ] ``` ### Get a single Tag `GET kb/tags/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "image". | - #### Response: [Tag](/docs/server-api-kb-tag#tag-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/kb/tags/d7a30ec8-1eb8-455f-8f28-b7e68429c432 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432", "name": "customize", "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc", "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f", "createdTime": "2021-05-08T05:51:31.123Z", "articles": 5 } ``` ### Create a new Tag `POST kb/tags` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `name` | string | body | yes | Name of the tag. | | `kbId` | guid | body | yes | Id of the knowledage base. | | `createdById` | guid | body | no | Id of the agent who modified the tag. | - #### Response: [Tag](/docs/server-api-kb-tag#tag-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/kb/tags \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"name":"customize","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f"}' ``` Response: HTTP/1.1 201 Created ``` { "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432", "name": "customize", "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc", "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f", "createdTime": "2021-05-08T05:51:31.123Z", "articles": 5 } ``` ### Update the Tag `PUT kb/tags/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `name` | string | body | yes | Name of the tag. | | `kbId` | guid | body | yes | Id of the knowledage base. | | `createdById` | guid | body | no | Id of the agent who modified the tag. | - #### Response: [Tag](/docs/server-api-kb-tag#tag-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/kb/tags/d7a30ec8-1eb8-455f-8f28-b7e68429c432 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"name":"customize","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f"}' ``` Response: HTTP/1.1 200 OK ``` { "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432", "name": "customize", "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc", "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f", "createdTime": "2021-05-08T05:51:31.123Z", "articles": 5 } ``` ### Remove the Tag `DELETE kb/tags/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/kb/tags/d7a30ec8-1eb8-455f-8f28-b7e68429c432 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content