---
title: "Search files with advanced filters"
method: POST
path: "/search/files"
tags: ["Search"]
---

# Search files with advanced filters

`POST /search/files`

Performs a full-account file search and returns files matching the provided query, paging options and filters.

## Query parameters

- `Offset` integer
- `Limit` integer

## Request body

- FileSearchRequest
  - `query` string, required — Full-text search expression. Required and non-empty.
  - `filters` FileSearchFilters
    - `searchFields` string[], nullable — Which file fields to match the search query against. Allowed values: `Name`, `Content`. Omit the property (or pass an empty array) to default to both.
    - `includeFileExtensions` string[], nullable — File extensions to include in the results (e.g. `pdf`, `docx`). When empty or null, all extensions are allowed.
    - `excludeFileExtensions` string[], nullable — File extensions to exclude from the results. Applied after IncludeFileExtensions.
    - `authorIds` string[], nullable — User identifiers of file authors to filter by. Results match files authored by any of the supplied users.
    - `contactIds` string[], nullable — Contact identifiers to filter by. Results match files associated with any of the supplied contacts.

## Response `200`

Returns the matching files.

- unknown[]
  - unknown

## Other responses

- `400` — When request body fields are invalid.

---

[API](https://skmtc.net/smokeball/apis/api.md) · [All operations](https://skmtc.net/smokeball/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smokeball/api/revisions/197984da9b42/schema)
