> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Specify API version when using custom document list filters

Custom document list filters in Structure Builder require an `apiVersion`. Learn where to add `.apiVersion()` and what value to set.

Sanity Studio logs a warning when a document list uses a custom filter without an `apiVersion`. It will be required in a future version. Until then, omitting it falls back to the Studio's default API version, `2025-02-19`. Set it to a date, for example `2026-10-26`. For more information, see [API versioning](https://www.sanity.io/docs/content-lake/api-versioning).

The warning reads `No apiVersion specified for document type list with custom filter: <your filter>. This will be required in the future. See <url> for more info.`

## Filter without an API version

This filter logs a warning, because it does not specify an `apiVersion`:

**structure.ts**

```typescript
S.documentList()
  .title('Posts')
  .filter('_type == "post" && $authorId == author._ref')
  .params({ authorId })

```

## Filter with an API version

Add `.apiVersion()` to the document list. This is the recommended form:

**structure.ts**

```typescript
S.documentList()
  .title('Posts')
  .apiVersion('2026-10-26')
  .filter('_type == "post" && $authorId == author._ref')
  .params({ authorId })
```

