Search Visitors by Term

Search Livechat visitors using a specific term.

HTTP MethodURLRequires Auth

GET

/api/v1/livechat/visitors.search

Query Parameters

This endpoint supports the optional Paginationquery parameters and the additional required parameter as follows:

KeyExample ValueDescription

term*

James

The visitor's name, username, email, or phone.

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/visitors.search?term=James' \
--header 'X-Auth-Token: EZmA1YMbEfghEPOmc03k0R9QiuVvKWjQClKVoF8x7LY' \
--header 'X-User-Id: rYhzFRd2QZjNwAAXX'

Example Response

{
    "visitors": [
        {
            "_id": "6410749f28384134ed600ce4",
            "username": "guest-14",
            "name": "James",
            "visitorEmails": [
                {
                    "address": "pilebe6631@kaudat.com"
                }
            ],
            "lastChat": {
                "_id": "eJ5ZzeT2XkLtcBkMM",
                "ts": "2023-03-14T13:21:02.239Z"
            }
        },
        {
            "_id": "63db8d4990fe6eda42ad429a",
            "username": "guest-3",
            "name": "James",
            "visitorEmails": [
                {
                    "address": "f.r@rocket.chat"
                }
            ],
            "lastChat": {
                "_id": "82htiMFZLCtvRFqZi",
                "ts": "2023-02-06T12:34:53.392Z"
            }
        }
    ],
    "count": 2,
    "offset": 0,
    "total": 2,
    "success": true
}

Last updated

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