To create and update canned responses, the following permissions are required:
save-canned-responsessave-all-canned-responses
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
Note: To update a canned response, the _id parameter is required along with the other required parameters. This parameter is not used to create a canned response.
{
"shortcut": "test-canned",
"text": "This is an example test for canned response",
"scope": "global",
"tags": [
"tag1",
"tag2"
]
}The shortcut to trigger the message snippet.
The message snippet.
The scope of the canned response. It can either be global, user or department.
The tags for your canned response.
The departmentId where the canned response belongs to. It is required if the scope is department.
The canned response's ID.
OK
{
"success": true
}Bad Request
{
"success": false,
"error": "must have required property 'shortcut' [invalid-params]",
"errorType": "invalid-params"
}{
"success": false,
"error": "must have required property 'scope' [invalid-params]",
"errorType": "invalid-params"
}{
"success": false,
"error": "Shortcut provided already exists [error-invalid-shortcut]",
"errorType": "error-invalid-shortcut",
"details": {
"method": "saveCannedResponse"
}
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}{
"success": false,
"error": "unauthorized"
}