--- title: "Chatbot Entity" slug: "server-api-bot-chatbot-entity" updated: 2022-07-11T02:59:53Z published: 2022-07-11T02:59:53Z canonical: "developer.comm100.com/server-api-bot-chatbot-entity" --- > ## 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. # Chatbot Entity ## Chatbot Entity - `Chatbot Entities` - Chatbot Entities Manage - `GET bot/chatbotEntities/{id}` - [Get a single Chatbot Entity](/docs/server-api-bot-chatbot-entity#get-a-single-chatbot-entity) - `GET bot/chatbots/{id}/chatbotEntities` - [Get the list of Chatbot Entities](/docs/server-api-bot-chatbot-entity#get-the-list-of-chatbot-entities) - `POST bot/chatbotEntities` - [Create a new Chatbot Entity](/docs/server-api-bot-chatbot-entity#create-a-new-chatbot-entity) - `PUT bot/chatbotEntities/{id}` - [Update the Chatbot Entity](/docs/server-api-bot-chatbot-entity#update-the-chatbot-entity) - `DELETE bot/chatbotEntities/{id}` - [Remove the Chatbot Entity](/docs/server-api-bot-chatbot-entity#remove-the-chatbot-entity) ### Chatbot Entity JSON Format Chatbot Entity is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the entity. | | `chatbotId` | guid | Id of the chatbot. | | `name` | string | Name of the entity. | | `chatbotEntityKeywords` | [chatbotEntityKeywords[]](/docs/server-api-bot-chatbot-entity#entity-keyword-json-format) | Reference to Entity Keyword. | ### Entity Keyword JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the entity keyword. | | `keyword` | string | Keyword. | | `synonyms` | string [] | An array of string, synonyms list of keyword. | | `entityId` | guid | Id of the entity. | ### Get a single Chatbot Entity `GET bot/chatbotEntities/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "chatbotEntityKeyword". | - #### Response: [Chatbot Entity](/docs/server-api-bot-chatbot-entity#chatbot-entity-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotEntities/73d07166-3dfc-4257-aec7-6b57b31684d1 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "73d07166-3dfc-4257-aec7-6b57b31684d1", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "color", "chatbotEntityKeywords": [ { "id": "171163c7-01dc-4ab7-9e13-33dd85654f78", "keyword": "Pink", "synonyms": [ "white pink" ], "entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570" } ] } ``` ### Get the list of Chatbot Entities `GET bot/chatbots/{id}/chatbotEntities` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `keywords` | string | query | no | Search entity name or keyword or synonym by the keyword. | | `chatbotId` | guid | query | yes | Id of the chatbot. | | `include` | string | query | no | Allowed value is "chatbotEntityKeyword". | | `sortBy` | string | query | yes | Allowed values is "Name". | - #### Response: An array of [Chatbot Entity](/docs/server-api-bot-chatbot-entity#chatbot-entity-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbots/73d07166-3dfc-4257-aec7-6b57b31684d1/chatbotEntities \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "chatbotEntities": [ { "id": "73d07166-3dfc-4257-aec7-6b57b31684d1", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "color", "chatbotEntityKeywords": [ { "id": "171163c7-01dc-4ab7-9e13-33dd85654f78", "keyword": "Pink", "synonyms": [ "white pink" ], "entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570" } ] } ], "nextPage": null, "previousPage": null, "total": 1 } ``` ### Create a new Chatbot Entity `POST bot/chatbotEntities` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `chatbotId` | guid | body | yes | Id of the chatbot. | | `name` | string | body | yes | Name of the entity. | | `chatbotEntityKeywords` | [chatbotEntityKeywords[]](/docs/server-api-bot-chatbot-entity#entity-keyword-json-format) | body | yes | Reference to Entity Keyword. | - #### Response: [Chatbot Entity](/docs/server-api-bot-chatbot-entity#chatbot-entity-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotEntities \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","name":"color","chatbotEntityKeywords":[{"keyword":"Pink","synonyms":["white pink"]}]}' ``` Response: HTTP/1.1 201 Created ``` { "id": "73d07166-3dfc-4257-aec7-6b57b31684d1", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "color", "chatbotEntityKeywords": [ { "id": "171163c7-01dc-4ab7-9e13-33dd85654f78", "keyword": "Pink", "synonyms": [ "white pink" ], "entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570" } ] } ``` ### Update the Chatbot Entity `PUT bot/chatbotEntities/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `chatbotId` | guid | body | yes | Id of the chatbot. | | `name` | string | body | yes | Name of the entity. | | `chatbotEntityKeywords` | [chatbotEntityKeywords[]](/docs/server-api-bot-chatbot-entity#entity-keyword-json-format) | body | yes | Reference to Entity Keyword. | - #### Response: [Chatbot Entity](/docs/server-api-bot-chatbot-entity#chatbot-entity-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotEntities/73d07166-3dfc-4257-aec7-6b57b31684d1 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","name":"color","chatbotEntityKeywords":[{"keyword":"Pink","synonyms":["white pink"]}]}' ``` Response: HTTP/1.1 200 OK ``` { "id": "73d07166-3dfc-4257-aec7-6b57b31684d1", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "color", "chatbotEntityKeywords": [ { "id": "171163c7-01dc-4ab7-9e13-33dd85654f78", "keyword": "Pink", "synonyms": [ "white pink" ], "entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570" } ] } ``` ### Remove the Chatbot Entity `DELETE bot/chatbotEntities/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotEntities/73d07166-3dfc-4257-aec7-6b57b31684d1 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content