---
title: "Autocomplete Room Name for Private and Public Rooms"
slug: "autocomplete-private-channel"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
stale: true
---

> ## 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.

# Autocomplete Room Name for Private and Public Rooms

Get/api/v1/rooms.autocomplete.channelAndPrivate

List the public and private rooms whose names match a given string, excluding [discussions](https://docs.rocket.chat/docs/discussions), [DMs](https://docs.rocket.chat/docs/direct-messages), and [omnichannel rooms](https://docs.rocket.chat/docs/omnichannel). The endpoint is valuable when performing search operations. It returns only rooms that the user belongs to.

Header parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Query parametersselectorstringRequired

The term to be completed. It only applies to room name.

Example{"name":"ran"}

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='885f6836-6a5f-4e1f-ab20-8a016587310d'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='22c1aa24-521a-4b9a-ac9b-b0369fe975c2'>Success</option>
</select>Success

```json
{
  "items": [
    {
      "_id": "664f0d525df46832f75b1860",
      "fname": "rancher",
      "name": "rancher",
      "t": "p"
    },
    {
      "_id": "6630e94ad2226209149c67e2",
      "fname": "random",
      "name": "random",
      "t": "c"
    },
    {
      "_id": "664f148f5df46832f75b18b2",
      "fname": "ranmowe",
      "name": "ranmowe",
      "t": "p"
    }
  ],
  "success": true
}
```

Expand Allobject  items Array of object   object  _idstring    
fnamestring    
namestring    
tstring    

successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='98960b49-40e5-4bf0-87e0-72c1f80aaa35'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='f0a7e128-9050-442e-bb2c-cd08cd2bc3fd'>Selector Param Required</option>
</select>Selector Param Required

```json
{
  "success": false,
  "error": "The 'selector' param is required"
}
```

object  successboolean    
errorstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='a26345f3-1c89-40c9-b7ab-afe8450f531f'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='b612331f-919b-411e-89cb-99ad6ec183c5'>Authorization Error</option>
</select>Authorization Error

```json
{
  "status": "error",
  "message": "You must be logged in to do this."
}
```

object  statusstring    
messagestring
