Links

List All Canned Responses

Get a list of all canned responses in the workspace. It is helpful for omnichannel managers to get all canned responses in the workspace, including private and departmental canned responses. It supports the Pagination parameters.
It requires the view-canned-responses and view-all-canned-responses permission.
URL
Requires Auth
HTTP Method
/api/v1/canned-responses
yes
GET

Headers

Argument
Example
Required
Description
X-User-Id
myuser-name
Required
The authenticated user ID.
X-Auth-Token
myauth-token
Required
Auth token.

Example Call

curl --location 'http://localhost:3000/api/v1/canned-responses' \
--header 'x-auth-token: Ja29cTtF-wkmq32z2zmy8defFiezECIBCBysrknSoYf' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ'

Example Result

Success

{
"cannedResponses": [
{
"_id": "646c747ca8c3a3ba32d0e2e8",
"shortcut": "Denied",
"text": "This is an example",
"scope": "global",
"createdBy": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "funke.olasupo"
},
"_createdAt": "2023-05-23T08:08:28.241Z",
"_updatedAt": "2023-05-23T08:08:28.241Z"
},
{
"_id": "646c6ed9a8c3a3ba32d0e2db",
"shortcut": "my-new-canned",
"text": "This is an example",
"scope": "global",
"tags": [
"failed",
"card"
],
"createdBy": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "funke.olasupo"
},
"_createdAt": "2023-05-23T07:44:25.912Z",
"_updatedAt": "2023-05-23T07:44:25.912Z"
},
{
"_id": "646c7350a8c3a3ba32d0e2e0",
"shortcut": "my-new-canned-",
"text": "This is an example",
"scope": "hi",
"tags": [
"failed",
"card"
],
"createdBy": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "funke.olasupo"
},
"_createdAt": "2023-05-23T08:03:28.148Z",
"_updatedAt": "2023-05-23T08:03:28.148Z"
}
],
"count": 3,
"offset": 0,
"total": 3,
"success": true
}

Error

Any of the following errors can occur on the endpoint.
  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: Occurs when the authenticated user doesn't have the view-canned-responses and view-all-canned-responses permission.
Authorization
No Permission
{
"status": "error",
"message": "You must be logged in to do this."
}
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}

Change Log

Version
Description
1.0.0
Added
Last modified 2mo ago
Deprecation for cloud services and apps is now extended to November 20, 2023. Rocket.Chat versions receive support for six months after release.