Update Livechat Room Visitor
    • Dark
      Light
    • PDF

    Update Livechat Room Visitor

    • Dark
      Light
    • PDF

    Article summary

    Put
    Deprecated
    /api/v1/livechat/room.visitor

    Update room visitor's information. Permission required: view-l-room

    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example 1
    {
      "rid": "tcbbSmWSLR5uo5PBW",
      "oldVisitorId": "6425bb86c29657e5b3ba26b2",
      "newVisitorId": "6523dc0ba2f73c7460e18d4d"
    }
    object
    rid
    string Required

    The room _id.

    oldVisitorId
    string Required

    The visitor's old id.

    newVisitorId
    string Required

    The visitor's new id.

    Responses
    200

    OK

    Success Example
    {
      "room": {
        "_id": "tcbbSmWSLR5uo5PBW",
        "msgs": 5,
        "usersCount": 2,
        "lm": "2023-03-30T16:58:11.899Z",
        "fname": "Mende",
        "t": "l",
        "ts": "2023-03-30T16:40:48.026Z",
        "v": {
          "_id": "6523dc0ba2f73c7460e18d4d",
          "username": "guest-16",
          "token": "8b15e7f76d3943646b9de8ca1e12aecb55297a321d29500e16143fa5bd6c622d",
          "status": "offline",
          "lastMessageTs": "2023-03-30T16:58:11.899Z"
        },
        "cl": false,
        "open": true,
        "source": {
          "type": "widget"
        },
        "queuedAt": "2023-03-30T16:40:48.026Z",
        "priorityWeight": 99,
        "estimatedWaitingTimeQueue": 9999999,
        "_updatedAt": "2023-05-02T14:47:45.855Z",
        "lastMessage": {
          "_id": "KLgpbsdZEgETahypp",
          "rid": "tcbbSmWSLR5uo5PBW",
          "msg": "Xup?",
          "token": "8b15e7f76d3943646b9de8ca1e12aecb55297a321d29500e16143fa5bd6c622d",
          "alias": "Mende",
          "ts": "2023-03-30T16:58:11.899Z",
          "u": {
            "_id": "6425bb86c29657e5b3ba26b2",
            "username": "guest-16",
            "name": "Mende"
          },
          "_updatedAt": "2023-03-30T16:58:12.017Z",
          "urls": [],
          "mentions": [],
          "channels": [],
          "md": [
            {
              "type": "PARAGRAPH",
              "value": [
                {
                  "type": "PLAIN_TEXT",
                  "value": "Xup?"
                }
              ]
            }
          ],
          "newRoom": false,
          "showConnecting": false
        },
        "metrics": {
          "reaction": {
            "fd": "2023-03-30T16:41:05.370Z",
            "ft": 16.987,
            "tt": 17.112
          },
          "response": {
            "avg": 7.1105,
            "fd": "2023-03-30T16:41:05.370Z",
            "ft": 14.096,
            "total": 2,
            "tt": 14.221
          },
          "v": {
            "lq": "2023-03-30T16:58:11.899Z"
          },
          "servedBy": {
            "lr": "2023-03-30T16:41:05.138Z"
          }
        },
        "servedBy": {
          "_id": "rYhzFRd2QZjNwAAXX",
          "username": "rodriq",
          "ts": "2023-03-30T16:40:48.383Z"
        },
        "waitingResponse": true
      },
      "success": true
    }
    Expand All
    object
    room
    object
    _id
    string
    msgs
    integer
    usersCount
    integer
    lm
    string
    fname
    string
    t
    string
    ts
    string
    v
    object
    _id
    string
    username
    string
    token
    string
    status
    string
    lastMessageTs
    string
    cl
    boolean
    open
    boolean
    source
    object
    type
    string
    queuedAt
    string
    priorityWeight
    integer
    estimatedWaitingTimeQueue
    integer
    _updatedAt
    string
    lastMessage
    object
    _id
    string
    rid
    string
    msg
    string
    token
    string
    alias
    string
    ts
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    _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
    servedBy
    object
    lr
    string
    servedBy
    object
    _id
    string
    username
    string
    ts
    string
    waitingResponse
    boolean
    success
    boolean
    400

    Bad Request

    Example 1
    {
      "success": false,
      "error": "must have required property 'rid' [invalid-params]",
      "errorType": "invalid-params"
    }
    object
    success
    boolean
    error
    string
    errorType
    string
    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.