Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/admin/reindexsearch

# Rebuild the FTS search_index

POST `https://api.rewind.rest/v1/admin/reindex-search`

Truncates and repopulates the search\_index FTS table from source tables. Pass `domains` in the body to limit scope; default rebuilds all five domains.

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Body

#### domains (body, array of enum (string))

#### chunk\_size (body, integer)

#### chunk\_offset (body, integer)

## Response

#### 200

Reindex complete

#### domains (object, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X POST 'https://api.rewind.rest/v1/admin/reindex-search' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"domains": ["reading"], "chunk_size": 0, "chunk_offset": 0}'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/admin/reindex-search', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"domains": ["reading"], "chunk_size": 0, "chunk_offset": 0}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.rewind.rest/v1/admin/reindex-search',
    headers={'Authorization': 'Bearer <token>'},
    json={"domains": ["reading"], "chunk_size": 0, "chunk_offset": 0}
)
data = res.json()
```

#### Response

```json 200
{
  "domains": {}
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```
