---
title: "添加IP到黑名单"
method: POST
path: "/api/v1/ip-groups/blacklist/add"
tags: ["IP组管理"]
---

# 添加IP到黑名单

`POST /api/v1/ip-groups/blacklist/add`

将指定的IP地址或CIDR添加到系统默认黑名单组中

## Request body

- DtoAddIPToBlacklistRequest — 添加IP地址或CIDR到系统默认黑名单的请求
  - `ip` string, required — IP地址或CIDR

## Response `200`

IP添加成功

- ModelSuccessResponseNoData — 成功的API响应标准格式,没有 data
  - `code` integer
  - `message` string
  - `requestId` string
  - `success` boolean
  - `timestamp` string

## Other responses

- `400` — 请求参数错误
- `401` — 未授权访问
- `404` — 系统默认黑名单不存在
- `500` — 服务器内部错误

## Changes

- **2025-05-10** `6cdb2dd47447` — 1 info
  - endpoint added
- **2025-03-13** `7b2561e7969f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/labring/apis/ruiqi-waf-api/changes/api/v1/ip-groups/blacklist/add/post.md)

---

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