> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 删除路由规则

> 删除一条告警路由规则。

```http theme={null}
DELETE /api/v1/alerts/routing/rules/{id}
```

删除一条[路由规则](https://docs.molesignal.com/zh-Hans/alerting/routing.md#路由规则)，需要 `alerts.routing.manage`。原本命中它的新事件改按后面的规则分派；已经开启的事件保留开启时的分派，事件上记下的规则名称也不变。

```bash cURL theme={null}
curl -X DELETE http://localhost:5080/api/v1/alerts/routing/rules/$RULE_ID \
  -H "authorization: Bearer $MS_TOKEN"
```

```json 200 theme={null}
{ "deleted": "3KF0q7vXbJ2mYc8sTn4LwRk9Ez1" }
```

**错误**

| 状态码 | 原因 |
| - | - |
| `403` | Token 缺少 `alerts.routing.manage`。 |
| `404` | 规则不存在，或属于其他组织。 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.