--- title: "Private Canned Message" slug: "server-api-global-setting-private-canned-message" updated: 2022-07-04T06:38:50Z published: 2022-07-04T06:38:50Z canonical: "developer.comm100.com/server-api-global-setting-private-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. # Private Canned Message ## Private Canned Message You need Manage Private Canned Messages permission to manage the private canned message. - `Private Canned Messages` - Private Canned Messages Manage - `GET global/privateCannedMessages` - [Get the list of Private Canned Messages](/docs/server-api-global-setting-private-canned-message#get-the-list-of-private-canned-messages) - `GET global/privateCannedMessages/{id}` - [Get a single Private Canned Message](/docs/server-api-global-setting-private-canned-message#get-a-single-private-canned-message) - `POST global/privateCannedMessages` - [Create a new Private Canned Message](/docs/server-api-global-setting-private-canned-message#create-a-new-private-canned-message) - `PUT global/privateCannedMessages/{id}` - [Update the Private Canned Message](/docs/server-api-global-setting-private-canned-message#update-the-private-canned-message) - `DELETE global/privateCannedMessages/{id}` - [Remove the Private Canned Message](/docs/server-api-global-setting-private-canned-message#remove-the-private-canned-message) ### Private Canned Message JSON Format Private Canned Message is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the private 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. | | `createdById` | guid | Id of the agent who create the canned message. | ### Get the list of Private Canned Messages `GET global/privateCannedMessages` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `category` | guid | query | no | Id of the private canned message category. | | `keywords` | string | query | no | Filter by keywords in name and message of the private canned message. | | `include` | string | query | no | Allowed value is "privateCannedMessageCategory". | - #### Response: An array of [Private Canned Message](/docs/server-api-global-setting-private-canned-message#private-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/privateCannedMessages \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "id": "e1be942c-b8e9-470a-8dfd-81ca521b1548", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "Goodbye", "message": "Goodbye", "htmlMessage": "
Goodbye
", "textMessage": "Goodbye", "shortcuts": "bye", "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d" } ] ``` ### Get a single Private Canned Message `GET global/privateCannedMessages/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "privateCannedMessageCategory". | - #### Response: [Private Canned Message](/docs/server-api-global-setting-private-canned-message#private-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/privateCannedMessages/e1be942c-b8e9-470a-8dfd-81ca521b1548 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "e1be942c-b8e9-470a-8dfd-81ca521b1548", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "Goodbye", "message": "Goodbye", "htmlMessage": "Goodbye
", "textMessage": "Goodbye", "shortcuts": "bye", "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d" } ``` ### Create a new Private Canned Message `POST global/privateCannedMessages` - #### 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. | | `createdById` | guid | body | no | Id of the agent who create the canned message. | - #### Response: [Private Canned Message](/docs/server-api-global-setting-private-canned-message#private-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/privateCannedMessages \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"categoryId":"79a02303-959b-eb11-8103-00155d081d0b","name":"Goodbye","message":"Goodbye","htmlMessage":"Goodbye
","textMessage":"Goodbye","shortcuts":"bye","createdById":"9a413cfe-792e-4abe-bc5e-8595640ddb3d"}' ``` Response: HTTP/1.1 201 Created ``` { "id": "e1be942c-b8e9-470a-8dfd-81ca521b1548", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "Goodbye", "message": "Goodbye", "htmlMessage": "Goodbye
", "textMessage": "Goodbye", "shortcuts": "bye", "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d" } ``` ### Update the Private Canned Message `PUT global/privateCannedMessages/{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. | | `createdById` | guid | body | no | Id of the agent who create the canned message. | - #### Response: [Private Canned Message](/docs/server-api-global-setting-private-canned-message#private-canned-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/privateCannedMessages/e1be942c-b8e9-470a-8dfd-81ca521b1548 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"categoryId":"79a02303-959b-eb11-8103-00155d081d0b","name":"Goodbye","message":"Goodbye","htmlMessage":"Goodbye
","textMessage":"Goodbye","shortcuts":"bye","createdById":"9a413cfe-792e-4abe-bc5e-8595640ddb3d"}' ``` Response: HTTP/1.1 200 OK ``` { "id": "e1be942c-b8e9-470a-8dfd-81ca521b1548", "categoryId": "79a02303-959b-eb11-8103-00155d081d0b", "name": "Goodbye", "message": "Goodbye", "htmlMessage": "Goodbye
", "textMessage": "Goodbye", "shortcuts": "bye", "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d" } ``` ### Remove the Private Canned Message `DELETE global/privateCannedMessages/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/global/privateCannedMessages/e1be942c-b8e9-470a-8dfd-81ca521b1548 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content