--- title: "Chatbot Canned Quick Reply" slug: "server-api-bot-chatbot-canned-quick-reply" updated: 2022-07-11T02:52:44Z published: 2022-07-11T02:52:44Z canonical: "developer.comm100.com/server-api-bot-chatbot-canned-quick-reply" --- > ## 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 Canned Quick Reply ## Chatbot Canned Quick Reply - `Chatbot Canned Quick Replies` - Chatbot Canned Quick Replies Manage - `GET bot/chatbotCannedQuickReplies/{id}` - [Get a single Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#get-a-single-chatbot-canned-quick-reply) - `GET bot/chatbots/{id}/chatbotCannedQuickReplies` - [Get the list of Chatbot Canned Quick Replies](/docs/server-api-bot-chatbot-canned-quick-reply#get-the-list-of-chatbot-canned-quick-replies) - `POST bot/chatbotCannedQuickReplies` - [Create a new Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#create-a-new-chatbot-canned-quick-reply) - `PUT bot/chatbotCannedQuickReplies/{id}` - [Update the Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#update-the-chatbot-canned-quick-reply) - `DELETE bot/chatbotCannedQuickReplies/{id}` - [Remove the Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#remove-the-chatbot-canned-quick-reply) ### Chatbot Canned Quick Reply JSON Format Chatbot Canned Quick Reply is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the quick reply. | | `chatbotId` | guid | Id of the chatbot. | | `name` | string | Name of the quick reply. | | `chatbotCannedQuickReplyItems` | [chatbotCannedQuickReplyItems[]](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-item-json-format) | Reference to Chatbot Canned Quick Reply Item. | ### Chatbot Canned Quick Reply Item JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the chatbot canned quick reply item. | | `order` | integer | Must be greater than or equal to 0, the order of the quick reply item, ascending order. | | `intentId` | guid | Id of the intent. | | `quickReplyId` | guid | Id of the quick reply. | | `text` | string | Only available when type is triggerAnIntent. | | `type` | enum | Allowed values are `triggerAnIntent`, `contactAnAgent`. | | `optionTextWhenAgentOnline` | string | Option text when agent online. | | `optionTextWhenAgentOffline` | string | Option text when agent offline. | | `intent` | [intent](/x2/docs/server-api-bot-chatbot-intent) | Reference to Chatbot Intent. | ### Get a single Chatbot Canned Quick Reply `GET bot/chatbotCannedQuickReplies/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed values are "chatbotCannedQuickReplyItem", "chatbotIntent". | - #### Response: [Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies/1064a6e1-4485-4ef5-a7d3-000fc57cd598 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598", "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2", "name": "default canned quick reply", "chatbotCannedQuickReplyItems": [ { "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60", "order": 0, "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d", "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530", "text": "Link to an intent", "type": "triggerAnIntent", "optionTextWhenAgentOnline": "", "optionTextWhenAgentOffline": "", "intent": { "id": "54c51763-8241-40a7-bb61-95231a03bb86", "name": "Thanks", "chatbotIntentCategoryId": "3bfcf193-9939-4abd-a832-2625ea02e75b", "chatbotIntentCategory": { "id": "ee705b05-33c0-43b6-ab4a-a138f28b6aa2", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "fruit", "order": 1, "parentId": "3bfcf193-9939-4abd-a832-2625ea02e75b" } } } ] } ``` ### Get the list of Chatbot Canned Quick Replies `GET bot/chatbots/{id}/chatbotCannedQuickReplies` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `keywords` | string | query | no | Search canned quick reply name by the keyword. | | `chatbotId` | guid | query | yes | Id of the chatbot. | | `sortBy` | string | query | yes | Allowed values are "name", "id" and "chatbot". | | `include` | string | query | no | Allowed values are "chatbotCannedQuickReplyItem", "chatbotIntent". | - #### Response: An array of [Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbots/1064a6e1-4485-4ef5-a7d3-000fc57cd598/chatbotCannedQuickReplies \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "chatbotCannedQuickReplies": [ { "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598", "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2", "name": "default canned quick reply", "chatbotCannedQuickReplyItems": [ { "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60", "order": 0, "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d", "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530", "text": "Link to an intent", "type": "triggerAnIntent", "optionTextWhenAgentOnline": "", "optionTextWhenAgentOffline": "", "intent": { "id": "54c51763-8241-40a7-bb61-95231a03bb86", "name": "Thanks", "chatbotIntentCategoryId": "3bfcf193-9939-4abd-a832-2625ea02e75b", "chatbotIntentCategory": { "id": "ee705b05-33c0-43b6-ab4a-a138f28b6aa2", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "fruit", "order": 1, "parentId": "3bfcf193-9939-4abd-a832-2625ea02e75b" } } } ] } ], "nextPage": null, "previousPage": null, "total": 1 } ``` ### Create a new Chatbot Canned Quick Reply `POST bot/chatbotCannedQuickReplies` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `chatbotId` | guid | body | yes | Id of the chatbot. | | `name` | string | body | yes | Name of the quick reply. | | `chatbotCannedQuickReplyItems` | [chatbotCannedQuickReplyItems[]](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-item-json-format) | body | no | Reference to Chatbot Canned Quick Reply Item. | - #### Response: [Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"chatbotId":"9626da62-e87b-4bfb-9925-2b72b04481f2","name":"default canned quick reply","chatbotCannedQuickReplyItems":[{"order":0,"intentId":"1a75ce57-d88e-4398-98a2-e39f0e18cc6d","text":"Link to an intent","type":"triggerAnIntent","optionTextWhenAgentOnline":"","optionTextWhenAgentOffline":""}]}' ``` Response: HTTP/1.1 201 Created ``` { "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598", "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2", "name": "default canned quick reply", "chatbotCannedQuickReplyItems": [ { "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60", "order": 0, "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d", "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530", "text": "Link to an intent", "type": "triggerAnIntent", "optionTextWhenAgentOnline": "", "optionTextWhenAgentOffline": "", "intent": { "id": "54c51763-8241-40a7-bb61-95231a03bb86", "name": "Thanks", "chatbotIntentCategoryId": "3bfcf193-9939-4abd-a832-2625ea02e75b", "chatbotIntentCategory": { "id": "ee705b05-33c0-43b6-ab4a-a138f28b6aa2", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "fruit", "order": 1, "parentId": "3bfcf193-9939-4abd-a832-2625ea02e75b" } } } ] } ``` ### Update the Chatbot Canned Quick Reply `PUT bot/chatbotCannedQuickReplies/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `chatbotId` | guid | body | yes | Id of the chatbot. | | `name` | string | body | yes | Name of the quick reply. | | `chatbotCannedQuickReplyItems` | [chatbotCannedQuickReplyItems[]](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-item-json-format) | body | no | Reference to Chatbot Canned Quick Reply Item. | - #### Response: [Chatbot Canned Quick Reply](/docs/server-api-bot-chatbot-canned-quick-reply#chatbot-canned-quick-reply-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies/1064a6e1-4485-4ef5-a7d3-000fc57cd598 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"chatbotId":"9626da62-e87b-4bfb-9925-2b72b04481f2","name":"default canned quick reply","chatbotCannedQuickReplyItems":[{"order":0,"intentId":"1a75ce57-d88e-4398-98a2-e39f0e18cc6d","text":"Link to an intent","type":"triggerAnIntent","optionTextWhenAgentOnline":"","optionTextWhenAgentOffline":""}]}' ``` Response: HTTP/1.1 200 OK ``` { "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598", "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2", "name": "default canned quick reply", "chatbotCannedQuickReplyItems": [ { "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60", "order": 0, "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d", "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530", "text": "Link to an intent", "type": "triggerAnIntent", "optionTextWhenAgentOnline": "", "optionTextWhenAgentOffline": "", "intent": { "id": "54c51763-8241-40a7-bb61-95231a03bb86", "name": "Thanks", "chatbotIntentCategoryId": "3bfcf193-9939-4abd-a832-2625ea02e75b", "chatbotIntentCategory": { "id": "ee705b05-33c0-43b6-ab4a-a138f28b6aa2", "chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609", "name": "fruit", "order": 1, "parentId": "3bfcf193-9939-4abd-a832-2625ea02e75b" } } } ] } ``` ### Remove the Chatbot Canned Quick Reply `DELETE bot/chatbotCannedQuickReplies/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies/1064a6e1-4485-4ef5-a7d3-000fc57cd598 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content