Get
/api/v1/livechat/visitors.search
Search Livechat visitors using a specific term.
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
term
stringRequired
The visitor's name, username, email, or phone.
offset
integer
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Example50
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}
. Refer to the official documentation to learn more.
Responses
200
Success Example
{
"visitors": [
{
"_id": "6410749f28384134ed600ce4",
"username": "guest-14",
"name": "James",
"visitorEmails": [
{
"address": "[email protected]"
}
],
"lastChat": {
"_id": "eJ5ZzeT2XkLtcBkMM",
"ts": "2023-03-14T13:21:02.239Z"
}
},
{
"_id": "63db8d4990fe6eda42ad429a",
"username": "guest-3",
"name": "James",
"visitorEmails": [
{
"address": "[email protected]"
}
],
"lastChat": {
"_id": "82htiMFZLCtvRFqZi",
"ts": "2023-02-06T12:34:53.392Z"
}
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}
object
visitors
Array of object
object
_id
string
username
string
name
string
visitorEmails
Array of object
object
address
string
lastChat
object
_id
string
ts
string
count
integer
offset
integer
total
integer
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "must have required property 'term' [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