---
title: "Autocomplete Room Name With Pagination"
slug: "autocomplete-room-name-with-pagination"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
---

> ## 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 With Pagination

Get/api/v1/rooms.autocomplete.channelAndPrivate.withPagination

List the public and private rooms whose names match a given string, excluding discussions, DMs, and omnichannel rooms. The endpoint is valuable when performing search operations. It returns only rooms that the user belongs to. This endpoint includes pagination query parameters.

Header parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Query parameterscountinteger

The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.

Example50
offsetinteger

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.

Example50
sort

List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.

selectorstringRequired

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

Example{"name":"api"}

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='ebb4c2b0-2569-4884-a387-df2cc3769b44'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='d8ecf245-3d00-4a1a-b04a-2986d1955a92'>Example 1</option>
</select>Example 1

```json
{
  "items": [
    {
      "_id": "66c82e1e237405fc05fc1ef4",
      "fname": "api-team",
      "name": "api-team",
      "t": "c"
    },
    {
      "_id": "66c88dae237405fc05fc1f06",
      "fname": "api-team2",
      "name": "api-team2",
      "t": "p"
    }
  ],
  "total": 4,
  "success": true
}
```

Expand Allobject  items Array of object   object  _idstring    
fnamestring    
namestring    
tstring    

totalinteger    
successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='182aa445-8829-44f0-a4a7-7f62e970adb7'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='cb7ae20d-e00b-404a-aabc-db9ce760ab82'>Example 1</option>
</select>Example 1

```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='ecf0d145-f420-45d4-93b0-a6892ad6c623'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='8b8d36a5-0382-41b6-8cef-158a8c19bf77'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
