---
title: "Set user-defined filter rules"
method: POST
path: "/filtering/set_rules"
tags: ["filtering"]
---

# Set user-defined filter rules

`POST /filtering/set_rules`

## Request

- Base URL: `/control` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/control/filtering/set_rules`
- Auth: HTTP basic

## Request body

- SetRulesRequest: Custom filtering rules setting request.
  - `rules` string[]

## Response `200`

OK.

## Changes

- **2026-07-17** `14ff21aeb363`: 1 breaking, 1 info
  - removed the media type `text/plain` from the request body
  - added the media type `application/json` to the request body
- **2023-03-26** `aecca8e1fa4f`: 1 breaking, 1 info
  - removed the media type `application/json` from the request body
  - added the media type `text/plain` to the request body

[Operation history](https://skmtc.dev/guardllamanet/apis/adguard-home/changes/filtering/set_rules/post.md)

---

[API](https://skmtc.dev/guardllamanet/apis/adguard-home.md) - [All operations](https://skmtc.dev/guardllamanet/apis/adguard-home/llms.txt) - [OpenAPI document](https://skmtc.dev/guardllamanet/apis/adguard-home/revisions/14ff21aeb363?raw)
