--- title: "Public Canned Message" slug: "server-api-global-setting-public-canned-message" updated: 2022-07-04T06:40:13Z published: 2022-07-04T06:40:13Z canonical: "developer.comm100.com/server-api-global-setting-public-canned-message" --- > ## 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. # Public Canned Message ## Public Canned Message You need Manage Public Canned Messages permission to manage the public canned message. - `Public Canned Messages` - Public Canned Messages Manage - `GET global/publicCannedMessages` - [Get the list of Public Canned Messages](/docs/server-api-global-setting-public-canned-message#get-the-list-of-public-canned-messages) - `GET global/publicCannedMessages/{id}` - [Get a single Public Canned Message](/docs/server-api-global-setting-public-canned-message#get-a-single-public-canned-message) - `POST global/publicCannedMessages` - [Create a new Public Canned Message](/docs/server-api-global-setting-public-canned-message#create-a-new-public-canned-message) - `PUT global/publicCannedMessages/{id}` - [Update the Public Canned Message](/docs/server-api-global-setting-public-canned-message#update-the-public-canned-message) - `DELETE global/publicCannedMessages/{id}` - [Remove the Public Canned Message](/docs/server-api-global-setting-public-canned-message#remove-the-public-canned-message) ### Public Canned Message JSON Format Public Canned Message is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the public canned message. | | `categoryId` | guid | Id of the category. | | `name` | string | Name of the canned message. | | `message` | string | Default message content in all channels. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `htmlMessage` | string | Message content for html email in Ticketing & Messaging. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `textMessage` | string | Message content for plaintext email in Ticketing & Messaging. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `shortcuts` | string | Shortcut using which agents can quickly locate the canned message while chatting with a visitor. | | `similarQuestions` | string [] | Available when Agent Assist is enabled. | | `category` | [PublicCannedMessageCategory[]](/server-api-global-setting-public-canned-message-category) | Reference to PublicCannedMessageCategory. | ### Get the list of Public Canned Messages `GET global/publicCannedMessages` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `category` | guid | query | no | Id of the public canned message category. | | `keywords` | string | query | no | Filter by keywords in name and message of the public canned message. | | `include` | string | query | no | Allowed value is "publicCannedMessageCategory". | - #### Response: An array of [Public Canned Message](/docs/server-api-global-setting-public-canned-message#public-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/publicCannedMessages \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "id": "7ea02303-959b-eb11-8103-00155d081d0b", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "thanks", "message": "thanks", "htmlMessage": "
thanks
", "textMessage": "thanks", "shortcuts": "thx", "similarQuestions": [ "are you ok?" ] } ] ``` ### Get a single Public Canned Message `GET global/publicCannedMessages/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "publicCannedMessageCategory". | - #### Response: [Public Canned Message](/docs/server-api-global-setting-public-canned-message#public-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/publicCannedMessages/7ea02303-959b-eb11-8103-00155d081d0b \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "7ea02303-959b-eb11-8103-00155d081d0b", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "thanks", "message": "thanks", "htmlMessage": "thanks
", "textMessage": "thanks", "shortcuts": "thx", "similarQuestions": [ "are you ok?" ] } ``` ### Create a new Public Canned Message `POST global/publicCannedMessages` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `categoryId` | guid | body | yes | Id of the category. | | `name` | string | body | yes | Name of the canned message. | | `message` | string | body | yes | Default message content in all channels. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `htmlMessage` | string | body | no | Message content for html email in Ticketing & Messaging. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `textMessage` | string | body | no | Message content for plaintext email in Ticketing & Messaging. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `shortcuts` | string | body | no | Shortcut using which agents can quickly locate the canned message while chatting with a visitor. | | `similarQuestions` | string [] | body | no | Available when Agent Assist is enabled. | - #### Response: [Public Canned Message](/docs/server-api-global-setting-public-canned-message#public-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/publicCannedMessages \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"categoryId":"79a02303-959b-eb11-8103-00155d081d0b","name":"thanks","message":"thanks","htmlMessage":"thanks
","textMessage":"thanks","shortcuts":"thx","similarQuestions":["are you ok?"]}' ``` Response: HTTP/1.1 201 Created ``` { "id": "7ea02303-959b-eb11-8103-00155d081d0b", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "thanks", "message": "thanks", "htmlMessage": "thanks
", "textMessage": "thanks", "shortcuts": "thx", "similarQuestions": [ "are you ok?" ] } ``` ### Update the Public Canned Message `PUT global/publicCannedMessages/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `categoryId` | guid | body | yes | Id of the category. | | `name` | string | body | yes | Name of the canned message. | | `message` | string | body | yes | Default message content in all channels. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `htmlMessage` | string | body | no | Message content for html email in Ticketing & Messaging. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `textMessage` | string | body | no | Message content for plaintext email in Ticketing & Messaging. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `shortcuts` | string | body | no | Shortcut using which agents can quickly locate the canned message while chatting with a visitor. | | `similarQuestions` | string [] | body | no | Available when Agent Assist is enabled. | - #### Response: [Public Canned Message](/docs/server-api-global-setting-public-canned-message#public-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/publicCannedMessages/7ea02303-959b-eb11-8103-00155d081d0b \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"categoryId":"79a02303-959b-eb11-8103-00155d081d0b","name":"thanks","message":"thanks","htmlMessage":"thanks
","textMessage":"thanks","shortcuts":"thx","similarQuestions":["are you ok?"]}' ``` Response: HTTP/1.1 200 OK ``` { "id": "7ea02303-959b-eb11-8103-00155d081d0b", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "thanks", "message": "thanks", "htmlMessage": "thanks
", "textMessage": "thanks", "shortcuts": "thx", "similarQuestions": [ "are you ok?" ] } ``` ### Remove the Public Canned Message `DELETE global/publicCannedMessages/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/publicCannedMessages/7ea02303-959b-eb11-8103-00155d081d0b \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content