> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# List All Canned Responses

> <div style="text-align: center; margin: 1rem 0 1rem 0;"><img src="https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/Enterprise%20tag.svg" alt="Enterprise" style="display: block; margin: auto;"></div>

Get a list of all canned responses in the workspace.

Permissions required:
- `view-canned-responses`
- `view-all-canned-responses`

### Changelog
| Version      | Description |
| ---------------- | ------------|
|1.0.0            | Added       |

## OpenAPI

````json GET /api/v1/canned-responses
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Omnichannel"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "tags": [
    {
      "name": "Omnichannel Users"
    },
    {
      "name": "Omnichannel Agents"
    },
    {
      "name": "Omnichannel Monitors"
    },
    {
      "name": "Omnichannel Visitors"
    },
    {
      "name": "Omnichannel Contacts"
    },
    {
      "name": "Omnichannel Rooms"
    },
    {
      "name": "Omnichannel Departments"
    },
    {
      "name": "Omnichannel Custom Fields"
    },
    {
      "name": "Omnichannel Business Hours"
    },
    {
      "name": "Omnichannel Priorities"
    },
    {
      "name": "Omnichannel Tags"
    },
    {
      "name": "Omnichannel Units"
    },
    {
      "name": "SLA Policies"
    },
    {
      "name": "Canned Responses"
    },
    {
      "name": "Omnichannel Transcript"
    },
    {
      "name": "Omnichannel Statistics"
    },
    {
      "name": "Omnichannel Agent Stats"
    },
    {
      "name": "Omnichannel Dashboards"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Omnichannel Inquiries"
    },
    {
      "name": "Omnichannel Webhooks"
    },
    {
      "name": "Livechat"
    },
    {
      "name": "Livechat Appearance"
    },
    {
      "name": "Livechat Triggers"
    },
    {
      "name": "Livechat Messages"
    },
    {
      "name": "Livechat Page Visited"
    }
  ],
  "paths": {
    "/api/v1/canned-responses": {
      "get": {
        "tags": [
          "Canned Responses"
        ],
        "summary": "List All Canned Responses",
        "description": "<div style=\"text-align: center; margin: 1rem 0 1rem 0;\"><img src=\"https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/Enterprise%20tag.svg\" alt=\"Enterprise\" style=\"display: block; margin: auto;\"></div>\n\nGet a list of all canned responses in the workspace.\n\nPermissions required:\n- `view-canned-responses`\n- `view-all-canned-responses`\n\n### Changelog\n| Version      | Description |\n| ---------------- | ------------|\n|1.0.0            | Added       |",
        "operationId": "get-api-v1-canned-responses",
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthToken"
          },
          {
            "$ref": "#/components/parameters/UserId"
          },
          {
            "name": "shortcut",
            "in": "query",
            "description": "The shortcut to trigger the message snippet.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "text",
            "in": "query",
            "description": "The message snippet.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "description": "The scope of the canned response. It can either be `global`, `user`, or `department`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "The tags for your canned response.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departmentId",
            "in": "query",
            "description": "The department ID where the canned response belongs to. It is required if the `scope` is `department`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/count"
          },
          {
            "$ref": "#/components/parameters/sort"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "createdBy",
            "description": "The user ID who created the canned response."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cannedResponses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "type": "string"
                          },
                          "shortcut": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "type": "string"
                              },
                              "username": {
                                "type": "string"
                              }
                            }
                          },
                          "_createdAt": {
                            "type": "string"
                          },
                          "_updatedAt": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Success Example": {
                    "value": {
                      "cannedResponses": [
                        {
                          "_id": "646c747ca8c3a3ba32d0e2e8",
                          "shortcut": "Denied",
                          "text": "This is an example",
                          "scope": "global",
                          "createdBy": {
                            "_id": "rbAXPnMktTFbNpwtJ",
                            "username": "kim.jane"
                          },
                          "_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": "doe.john"
                          },
                          "_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": "jane.mary"
                          },
                          "_createdAt": "2023-05-23T08:03:28.148Z",
                          "_updatedAt": "2023-05-23T08:03:28.148Z"
                        }
                      ],
                      "count": "3",
                      "offset": "0",
                      "total": "3",
                      "success": "true"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "$ref": "#/components/responses/permissionError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "AuthToken": {
        "name": "X-Auth-Token",
        "in": "header",
        "description": "The `authToken` of the authenticated user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
      },
      "UserId": {
        "name": "X-User-Id",
        "in": "header",
        "description": "The `userId` of the authenticated user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "rbAXPnMktTFbNpwtJ"
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "required": "false",
        "schema": {
          "type": "integer"
        },
        "example": "50",
        "description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "count": {
        "name": "count",
        "in": "query",
        "required": "false",
        "schema": {
          "type": "integer"
        },
        "example": "25",
        "description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "required": "false",
        "schema": {
          "format": "object"
        },
        "description": "List of fields to order by, and in which direction. JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, sort = `{\"value\": -1, \"_id\": 1}`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "fields": {
        "name": "fields",
        "in": "query",
        "schema": {},
        "description": "This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: fields = `{\"username\": 1}`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#query-and-fields) to learn more."
      }
    },
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      },
      "permissionError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Permission Error": {
                "value": {
                  "success": "false",
                  "error": "User does not have the permissions required for this action [error-unauthorized]"
                }
              },
              "Unauthorized": {
                "value": {
                  "success": "false",
                  "error": "unauthorized"
                }
              }
            }
          }
        }
      }
    }
  }
}
````

