Documentation Index

Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt

Use this file to discover all available pages before exploring further.

Spotlight

Prev Next
Get
/api/v1/spotlight

Searches for users or rooms that are visible to the user. It will only return rooms that user didn't join yet.

If the Allow Anonymous Read setting is enabled, anonymous callers can use this endpoint to resolve public channels through the navbar search.

Changelog

Version Description
8.6.0 Added usernames, type, and rid query parameters, and allowed anonymous read when Allow Anonymous Read is enabled.
0.64.0 Added support to '#' and '@' searches, for channels and users respectively.
0.61.0 Added
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
query
stringRequired

The term to be searched. Supports '#' for channels and '@' for users

Examplejohn
usernames
string

Comma-separated list of usernames to exclude from the user results.

Examplerocket.cat,john.doe
type
string

Restricts the search to a single result type. Accepts users or rooms.

Exampleusers
rid
string

The room ID to scope the user search to a specific room.

ExampleGENERAL
Responses
200

OK

Success
{
  "users": [
    {
      "_id": "rocket.cat",
      "name": "Rocket.Cat",
      "username": "rocket.cat",
      "status": "online",
      "avatarETag": "5BB9B5ny5DkKdrwkq"
    }
  ],
  "rooms": [],
  "success": true
}
Expand All
object
users
Array of object
object
_id
string
name
string
username
string
status
string
avatarETag
string
rooms
Array of object
object
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string