Save canned response
Create a canned response, or change one by its ID.
POST https://cotlet.dev/api/v1/livechat/canned-response/save
write Confirm
Creates a shared or private canned response with its text, shortcuts, group and up to 5 tags, or updates an existing one when response_id is set. A shared response is usable by the whole team, or by one group. Variables such as %customer-name% are filled in when an agent sends it. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| text string required | string | Message text. Variables: %customer-name%, %customer-email%, %agent-name%, %agent-email%. |
| shortcuts string[] required | string[] | Words you type after #. |
| visibility enum | enum | shared or private. Default: shared. |
| group string | string | Limit the response to one group. |
| tags string[] | string[] | Up to 5 tags from the same group. |
| response_id string | string | Set to change an existing response. |
Request
curl -X POST https://cotlet.dev/api/v1/livechat/canned-response/save \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hi %customer-name%, standard delivery takes 3 to 5 working days. Your tracking link arrives by email once the parcel ships.","shortcuts":["delivery-times"],"visibility":"shared"}' result = client.call("livechat", "save_canned_response", {"text":"Hi %customer-name%, standard delivery takes 3 to 5 working days. Your tracking link arrives by email once the parcel ships.","shortcuts":["delivery-times"],"visibility":"shared"}) const result = await cotlet.call('livechat', 'save_canned_response', {"text":"Hi %customer-name%, standard delivery takes 3 to 5 working days. Your tracking link arrives by email once the parcel ships.","shortcuts":["delivery-times"],"visibility":"shared"}); cotlet call livechat save_canned_response --data '{"text":"Hi %customer-name%, standard delivery takes 3 to 5 working days. Your tracking link arrives by email once the parcel ships.","shortcuts":["delivery-times"],"visibility":"shared"}' Example response
{
"response_id": "cr_1042",
"visibility": "shared",
"shortcuts": [
"delivery-times"
],
"status": "saved"
}