--- title: "Chatbot Intent Question" slug: "server-api-bot-chatbot-intent-question" updated: 2022-07-11T06:03:11Z published: 2022-07-11T06:03:11Z canonical: "developer.comm100.com/server-api-bot-chatbot-intent-question" --- > ## 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 Intent Question ## Chatbot Intent Question - `Chatbot Intent Questions` - Chatbot Intent Questions Manage - `GET bot/chatbotIntentQuestions` - [Get the list of Chatbot Intent Questions](/docs/server-api-bot-chatbot-intent-question#get-the-list-of-chatbot-intent-questions) - `GET bot/chatbotIntentQuestions/{id}` - [Get a single Chatbot Intent Question](/docs/server-api-bot-chatbot-intent-question#get-a-single-chatbot-intent-question) - `POST bot/chatbotIntentQuestions` - [Create a new Chatbot Intent Question](/docs/server-api-bot-chatbot-intent-question#create-a-new-chatbot-intent-question) ### Chatbot Intent Question JSON Format Chatbot Intent Question is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the intent question. | | `order` | integer | Must be greater than or equal to 0, ascending order. | | `intentId` | guid | Id of the intent. | | `content` | string | Visitor questions that tigger this intent. | | `chatbotIntentQuestionKeywords` | [chatbotIntentQuestionKeywords[]](/docs/server-api-bot-chatbot-intent-question#chatbot-intent-question-keyword-json-format) | Reference to Chatbot Intent Question Keyword. | ### Chatbot Intent Question Keyword JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the chatbot intent question keyword. | | `intentQuestionId` | guid | Id of the chatbot intent question. | | `variableName` | string | Label to distinguish same entity marked on one question. | | `startPosition` | integer | Start index of current question you marked. | | `endPosition` | integer | End index of current question you marked. | | `ifPrebuiltEntity` | bool | Whether marked entity is prebuilt entity or custom entity. | | `prebuiltEntityId` | guid | Id of the marked prebuilt entity. | | `entityId` | guid | Id of the entity marked in one question. | | `entity` | [entity](/x2/docs/server-api-bot-chatbot-entity) | Reference to Chatbot Entity. | | `prebuiltEntity` | [prebuiltEntity](/x2/docs/server-api-bot-prebuilt-entity) | Reference to Prebuilt Entity. | ### Get the list of Chatbot Intent Questions `GET bot/chatbotIntentQuestions` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `intentId` | guid | query | no | Id of the intent. | | `include` | string | query | no | Allowed value is "chatbotIntentQuestionKeyword". | - #### Response: An array of [Chatbot Intent Question](/docs/server-api-bot-chatbot-intent-question#chatbot-intent-question-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotIntentQuestions \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "id": "83d2660f-b7e6-409a-b072-896a4ee4914a", "order": 0, "intentId": "2fde3f7e-8c23-4852-97be-a28fa5289d0e", "content": "Hello", "chatbotIntentQuestionKeywords": [ { "id": "45e7763e-f20d-4324-ab35-b51a70ae8680", "intentQuestionId": "ee3ce615-38f8-469c-abcf-4a51e79fd54b", "variableName": "color", "startPosition": 5, "endPosition": 20, "ifPrebuiltEntity": false, "prebuiltEntityId": "00000000-0000-0000-0000-000000000000", "entityId": "d394618e-6c2a-444f-b4b3-5b88ed2466ad", "entity": { "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" } ] }, "prebuiltEntity": { "dialogflowEntityId": "376B93B1-C148-EB11-8100-00155D081D0B", "id": "386B93B1-C148-EB11-8100-00155D081D0B", "name": "entity", "description": "description", "example": [ "entity1", "entity2" ], "languageCode": "en" } } ] } ] ``` ### Get a single Chatbot Intent Question `GET bot/chatbotIntentQuestions/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "chatbotIntentQuestionKeyword". | - #### Response: [Chatbot Intent Question](/docs/server-api-bot-chatbot-intent-question#chatbot-intent-question-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotIntentQuestions/83d2660f-b7e6-409a-b072-896a4ee4914a \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "83d2660f-b7e6-409a-b072-896a4ee4914a", "order": 0, "intentId": "2fde3f7e-8c23-4852-97be-a28fa5289d0e", "content": "Hello", "chatbotIntentQuestionKeywords": [ { "id": "45e7763e-f20d-4324-ab35-b51a70ae8680", "intentQuestionId": "ee3ce615-38f8-469c-abcf-4a51e79fd54b", "variableName": "color", "startPosition": 5, "endPosition": 20, "ifPrebuiltEntity": false, "prebuiltEntityId": "00000000-0000-0000-0000-000000000000", "entityId": "d394618e-6c2a-444f-b4b3-5b88ed2466ad", "entity": { "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" } ] }, "prebuiltEntity": { "dialogflowEntityId": "376B93B1-C148-EB11-8100-00155D081D0B", "id": "386B93B1-C148-EB11-8100-00155D081D0B", "name": "entity", "description": "description", "example": [ "entity1", "entity2" ], "languageCode": "en" } } ] } ``` ### Create a new Chatbot Intent Question `POST bot/chatbotIntentQuestions` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `order` | integer | body | no | Must be greater than or equal to 0, ascending order. | | `intentId` | guid | body | yes | Id of the intent. | | `content` | string | body | yes | Visitor questions that tigger this intent. | | `chatbotIntentQuestionKeywords` | [chatbotIntentQuestionKeywords[]](/docs/server-api-bot-chatbot-intent-question#chatbot-intent-question-keyword-json-format) | body | no | Reference to Chatbot Intent Question Keyword. | - #### Response: [Chatbot Intent Question](/docs/server-api-bot-chatbot-intent-question#chatbot-intent-question-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotIntentQuestions \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"order":0,"intentId":"2fde3f7e-8c23-4852-97be-a28fa5289d0e","content":"Hello","chatbotIntentQuestionKeywords":[{"variableName":"color","startPosition":5,"endPosition":20,"ifPrebuiltEntity":false,"prebuiltEntityId":"00000000-0000-0000-0000-000000000000","entityId":"d394618e-6c2a-444f-b4b3-5b88ed2466ad"}]}' ``` Response: HTTP/1.1 201 Created ``` { "id": "83d2660f-b7e6-409a-b072-896a4ee4914a", "order": 0, "intentId": "2fde3f7e-8c23-4852-97be-a28fa5289d0e", "content": "Hello", "chatbotIntentQuestionKeywords": [ { "id": "45e7763e-f20d-4324-ab35-b51a70ae8680", "intentQuestionId": "ee3ce615-38f8-469c-abcf-4a51e79fd54b", "variableName": "color", "startPosition": 5, "endPosition": 20, "ifPrebuiltEntity": false, "prebuiltEntityId": "00000000-0000-0000-0000-000000000000", "entityId": "d394618e-6c2a-444f-b4b3-5b88ed2466ad", "entity": { "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" } ] }, "prebuiltEntity": { "dialogflowEntityId": "376B93B1-C148-EB11-8100-00155D081D0B", "id": "386B93B1-C148-EB11-8100-00155D081D0B", "name": "entity", "description": "description", "example": [ "entity1", "entity2" ], "languageCode": "en" } } ] } ```