Private Canned Message
  • 04 Jul 2022
  • 4 Minutes to read
  • Dark
    Light

Private Canned Message

  • Dark
    Light

Article Summary

Private Canned Message

You need Manage Private Canned Messages permission to manage the private canned message.

Private Canned Message JSON Format

Private Canned Message is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the private canned message.
categoryIdguidId of the category.
namestringName of the canned message.
messagestringDefault 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.
htmlMessagestringMessage 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.
textMessagestringMessage 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.
shortcutsstringShortcut using which agents can quickly locate the canned message while chatting with a visitor.
createdByIdguidId of the agent who create the canned message.

Get the list of Private Canned Messages

GET global/privateCannedMessages

  • Parameters:

NameTypeinRequiredDescription
categoryguidquerynoId of the private canned message category.
keywordsstringquerynoFilter by keywords in name and message of the private canned message.
includestringquerynoAllowed value is "privateCannedMessageCategory".
  • Response:

An array of Private Canned Message

  • 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": "<p>Goodbye</p>",
      "textMessage": "Goodbye",
      "shortcuts": "bye",
      "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d"
  }
] 

Get a single Private Canned Message

GET global/privateCannedMessages/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "privateCannedMessageCategory".
  • Response:

Private Canned Message

  • 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": "<p>Goodbye</p>",
  "textMessage": "Goodbye",
  "shortcuts": "bye",
  "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d"
} 

Create a new Private Canned Message

POST global/privateCannedMessages

  • Parameters:

NameTypeinRequiredDescription
categoryIdguidbodyyesId of the category.
namestringbodyyesName of the canned message.
messagestringbodyyesDefault 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.
htmlMessagestringbodynoMessage 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.
textMessagestringbodynoMessage 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.
shortcutsstringbodynoShortcut using which agents can quickly locate the canned message while chatting with a visitor.
createdByIdguidbodynoId of the agent who create the canned message.
  • Response:

Private Canned Message

  • 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":"<p>Goodbye</p>","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": "<p>Goodbye</p>",
  "textMessage": "Goodbye",
  "shortcuts": "bye",
  "createdById": "9a413cfe-792e-4abe-bc5e-8595640ddb3d"
} 

Update the Private Canned Message

PUT global/privateCannedMessages/{id}

  • Parameters:

NameTypeinRequiredDescription
categoryIdguidbodyyesId of the category.
namestringbodyyesName of the canned message.
messagestringbodyyesDefault 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.
htmlMessagestringbodynoMessage 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.
textMessagestringbodynoMessage 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.
shortcutsstringbodynoShortcut using which agents can quickly locate the canned message while chatting with a visitor.
createdByIdguidbodynoId of the agent who create the canned message.
  • Response:

Private Canned Message

  • 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":"<p>Goodbye</p>","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": "<p>Goodbye</p>",
  "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


Was this article helpful?