---
title: "Update the workspace filters"
method: PATCH
path: "/v1/filters"
tags: ["Filters"]
---

# Update the workspace filters

`PATCH /v1/filters`

## Request

- Base URL: `https://api.mentio.dev`
- URL: `https://api.mentio.dev/v1/filters`
- Auth: HTTP bearer

Replace any of the lists; an omitted list is untouched and an empty one clears it. Entries are stored in canonical form (terms lowercased, authors as profile links or bare names, repositories as owner/name, subreddits without r/). Takes effect on new mentions within a minute; stored mentions are untouched.

## Request body

- object: Omitted fields are untouched; an empty list clears one.
  - `excludedTerms` string[]: Replaces the list; [] clears it.
  - `excludedAuthors` string[]: Replaces the list; [] clears it.
  - `excludedRepos` string[]: Replaces the list; [] clears it.
  - `subreddits` object: Reddit only; an omitted list is untouched.
    - `only` string[]: Replaces the allowlist; [] clears it.
    - `excluded` string[]: Replaces the deny list; [] clears it.

## Response `200`

The updated filters

- WorkspaceFilters: Workspace-wide matching rules; a rejected post is never billed.
  - `excludedTerms` string[], required: A post containing any of these is dropped, whatever keyword matched it. Same phrase rule as a keyword; a `*` at an end is a wildcard. "hiring, job, careers" is the classic list.
  - `excludedAuthors` string[], required: Posts by these authors are dropped everywhere: your own accounts, employees, known spammers. Profile or post links, @handles, u/names, Bluesky DIDs or display names, stored in canonical form.
  - `excludedRepos` string[], required: GitHub repositories whose issues, pull requests and comments are dropped, as owner/name or a github.com link (facebook/react, https://github.com/facebook/react).
  - `subreddits` object, required: Reddit only.
    - `only` string[], required: When non-empty, ONLY Reddit posts from these subreddits pass and `excluded` is ignored. r/name or name.
    - `excluded` string[], required: Reddit posts from these subreddits are dropped. r/name or name.
  - `updatedAt` string, nullable, required: Last edit; null until the first.

## Other responses

- `400`: An entry is not a term, an author, a repository or a subreddit
- `401`: Missing or invalid API key

---

[API](https://skmtc.dev/mentio/apis/mentio-api.md) · [All operations](https://skmtc.dev/mentio/apis/mentio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mentio/apis/mentio-api/revisions/b16a21d0ed02?raw)
