Autocomplete Visitors

Prev Next
Get
/api/v1/livechat/visitors.autocomplete

Search for visitors by name.

Permission required: view-l-room

The conditions field in the selector parameter is deprecated and will be removed in Rocket.Chat 9.0.0. In 8.8, requests containing a non-empty conditions object continue to work, but the response includes deprecation headers and the server records a warning.

Changelog

Version Description
8.8.0 Deprecated the conditions field in the selector parameter.
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
selector
stringRequired

A JSON string containing the search term and an optional array of visitor IDs to exclude in exceptions. The conditions field is deprecated and will be removed in Rocket.Chat 9.0.0.

Example{"exceptions":[],"term":"Jane"}
Responses
200

OK

Headers
x-deprecation-type
string
Returned as `parameter-deprecation` when the request contains a non-empty `selector.conditions` object.
Exampleparameter-deprecation
x-deprecation-message
string
Describes the deprecated parameter and its removal version. Returned when the request contains a non-empty `selector.conditions` object.
x-deprecation-version
string
The Rocket.Chat version in which the deprecated parameter will be removed. Returned when the request contains a non-empty `selector.conditions` object.
Example9.0.0
Success Example
{
  "items": [
    {
      "_id": "6400be90fa0ed7dd90509300",
      "username": "guest-5",
      "name": "Jane",
      "custom_name": "guest-5 - An agent"
    }
  ],
  "success": true
}
Expand All
object
items
Array of object
object
_id
string
username
string
name
string
custom_name
string
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "must have required property 'selector' [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