List All Canned Responses
    • Dark
      Light
    • PDF

    List All Canned Responses

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/canned-responses
    Premium tag

    Get a list of all canned responses in the workspace.

    Permissions required:

    • view-canned-responses
    • view-all-canned-responses

    Changelog

    VersionDescription
    1.0.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Query parameters
    shortcut
    string

    The shortcut to trigger the message snippet.

    text
    string

    The message snippet.

    scope
    string

    The scope of the canned response. It can either be global, user, or department.

    tags
    string

    The tags for your canned response.

    departmentId
    string

    The department ID where the canned response belongs to. It is required if the scope is department.

    offset
    integer

    Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.

    Example50
    count
    integer

    The number of items to return.

    Example25
    sort
    (object)

    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}

    fields

    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}

    createdBy
    string

    The user ID who created the canned response.

    Responses
    200

    OK

    Success Example
    {
      "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
    }
    Expand All
    object
    cannedResponses
    Array of object
    object
    _id
    string
    shortcut
    string
    text
    string
    scope
    string
    createdBy
    object
    _id
    string
    username
    string
    _createdAt
    string
    _updatedAt
    string
    tags
    Array of string
    string
    count
    integer
    offset
    integer
    total
    integer
    success
    boolean
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string
    403

    Forbidden

    Example 1
    {
      "success": false,
      "error": "User does not have the permissions required for this action [error-unauthorized]"
    }
    Example 2
    {
      "success": false,
      "error": "unauthorized"
    }
    object
    success
    boolean
    error
    string


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.