Search Livechat visitors using a specific term.
HTTP Method | URL | Requires Auth |
---|---|---|
GET | /api/v1/livechat/visitors.search | yes |
This endpoint supports the optional #paginationquery parameters and the additional required parameter as follows:
Key | Example Value | Description |
---|---|---|
term * | James | The visitor's name, username, email, or phone. |
curl --location 'http://localhost:3000/api/v1/livechat/visitors.search?term=James' \
--header 'X-Auth-Token: EZmA1YMbEfghEPOmc03k0R9QiuVvKWjQClKVoF8x7LY' \
--header 'X-User-Id: rYhzFRd2QZjNwAAXX'
{
"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
}