Get Livechat Visitor Chat History
    • Dark
      Light
    • PDF

    Get Livechat Visitor Chat History

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/livechat/visitors.chatHistory/room/{roomId}/visitor/{visitorId}
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Path parameters
    roomId
    stringRequired

    The room ID.

    visitorId
    stringRequired

    The visitor ID.

    Query parameters
    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}

    Responses
    200
    Success Example
    {
      "history": [
        {
          "_id": "hhMKhHnnbY79mGs9K",
          "msgs": 2,
          "usersCount": 1,
          "lm": "2021-07-22T17:17:04.937Z",
          "fname": "Maria",
          "t": "l",
          "ts": "2021-07-22T17:17:04.216Z",
          "departmentId": "CAJioQNAvLnYWTy8i",
          "v": {
            "_id": "QyBAKC5Wc8tcv6cco",
            "username": "guest-537",
            "token": "8s7e9ony6ctl27e1qf8kue",
            "status": "online",
            "lastMessageTs": "2021-07-22T17:17:04.937Z"
          },
          "cl": false,
          "open": true,
          "_updatedAt": "2021-07-22T17:17:05.078Z",
          "departmentAncestors": [
            "sriw2wmP2Zz2pPrre"
          ],
          "lastMessage": {
            "_id": "YfrxZ6gmaYLpPTxFP",
            "rid": "hhMKhHnnbY79mGs9K",
            "msg": "hi",
            "token": "8s7e9ony6ctl27e1qf8kue",
            "alias": "Maria",
            "ts": "2021-07-22T17:17:04.937Z",
            "u": {
              "_id": "QyBAKC5Wc8tcv6cco",
              "username": "guest-537",
              "name": "Maria"
            },
            "unread": true,
            "_updatedAt": "2021-07-22T17:17:05.044Z",
            "urls": [],
            "mentions": [],
            "channels": [],
            "md": [
              {
                "type": "PARAGRAPH",
                "value": [
                  {
                    "type": "PLAIN_TEXT",
                    "value": "hi"
                  }
                ]
              }
            ],
            "newRoom": false,
            "showConnecting": true
          },
          "metrics": {
            "reaction": {
              "fd": "2021-07-22T17:17:04.449Z",
              "ft": 0.233,
              "tt": 0.233
            },
            "response": {
              "avg": 0.233,
              "fd": "2021-07-22T17:17:04.449Z",
              "ft": 0.233,
              "total": 1,
              "tt": 0.233
            },
            "v": {
              "lq": "2021-07-22T17:17:04.937Z"
            }
          },
          "waitingResponse": true
        }
      ],
      "count": 1,
      "offset": 0,
      "total": 1,
      "success": true
    }
    Expand All
    object
    history
    Array of object
    object
    _id
    string
    msgs
    integer
    usersCount
    integer
    lm
    string
    fname
    string
    t
    string
    ts
    string
    departmentId
    string
    v
    object
    _id
    string
    username
    string
    token
    string
    status
    string
    lastMessageTs
    string
    cl
    boolean
    open
    boolean
    _updatedAt
    string
    departmentAncestors
    Array of string
    string
    lastMessage
    object
    _id
    string
    rid
    string
    msg
    string
    token
    string
    alias
    string
    ts
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    unread
    boolean
    _updatedAt
    string
    urls
    Array of object
    object
    mentions
    Array of object
    object
    channels
    Array of object
    object
    md
    Array of object
    object
    type
    string
    value
    Array of object
    object
    type
    string
    value
    string
    newRoom
    boolean
    showConnecting
    boolean
    metrics
    object
    reaction
    object
    fd
    string
    ft
    number
    tt
    number
    response
    object
    avg
    number
    fd
    string
    ft
    number
    total
    integer
    tt
    number
    v
    object
    lq
    string
    waitingResponse
    boolean
    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

    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.