Get a Canned Response

Get a specific canned response.

HTTP MethodURLRequires Auth

GET

/api/v1/canned-responses/:_id

Permission required: view-canned-responses

Path Variables

KeyExample ValueDescription

_id*

EwmbZ9nLSx7kFamYB

The canned response's ID.

Example Call

curl --location --request DELETE 'http://localhost:3000/api/v1/canned-responses/EwmbZ9nLSx7kFamYB' \
--header 'X-User-Id: 2tTEqR7ZNMJ4HGGNa' \
--header 'X-Auth-Token: A6PF2Qa-w-gl1BvJ11jYiSMt6Z_G'

Example Result

Success

{
  "cannedResponse": {
    "_id": "EwmbZ9nLSx7kFamYB",
    "shortcut": "user",
    "text": "Meu 32423423423423423",
    "scope": "user",
    "userId": "9L3wuBXKpbAWdfgx8",
    "createdBy": {
      "_id": "9L3wuBXKpbAWdfgx8",
      "username": "rafael.ferreira"
    },
    "_createdAt": "2021-05-26T18:59:17.929Z",
    "_updatedAt": "2021-05-26T18:59:17.929Z"
  },
  "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 permission.

{
    "status": "error",
    "message": "You must be logged in to do this."
}

Change Log

VersionDescription

1.0.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.