Search Visitors by Term
    • Dark
      Light
    • PDF

    Search Visitors by Term

    • Dark
      Light
    • PDF

    Article summary

    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.

    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
    {
      "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
    }
    Expand All
    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

    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.