---
title: "GET /JSON/replacer/action/addRule/"
method: GET
path: "/JSON/replacer/action/addRule/"
tags: ["replacer"]
---

# GET /JSON/replacer/action/addRule/

`GET /JSON/replacer/action/addRule/`

Adds a replacer rule. For the parameters: desc is a user friendly description, enabled is true or false, matchType is one of [REQ_HEADER, REQ_HEADER_STR, REQ_BODY_STR, RESP_HEADER, RESP_HEADER_STR, RESP_BODY_STR], matchRegex should be true if the matchString should be treated as a regex otherwise false, matchString is the string that will be matched against, replacement is the replacement string, initiators may be blank (for all initiators) or a comma separated list of integers as defined in <a href="https://www.zaproxy.org/docs/constants/">Request Initiator Constants</a>

## Response `default`

Error of JSON endpoints.

- ErrorJson
  - `code` string, required
  - `message` string, required
  - `detail` string

## Changes

> 4 revisions in range; 1 could not be searched.

- **2023-09-29** `3a1d8df7169d` — 1 info
  - endpoint added
- **2019-10-10** `c7cc14d831c3` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/zaproxy/apis/zap-api/changes/JSON/replacer/action/addRule/get.md)

---

[API](https://skmtc.dev/zaproxy/apis/zap-api.md) · [All operations](https://skmtc.dev/zaproxy/apis/zap-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zaproxy/zap-api/revisions/bbb71f68ed4c/schema)
