> ## 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/sources/{id}
```

删除一个[告警来源](https://docs.molesignal.com/zh-Hans/alerting/sources.md)，需要 `alerts.sources.manage`。它的 Token 立即失效，最近收到的请求一起删除。它开着的事件都会以调用用户的名义解决：来源没了，这些事件再也收不到恢复。开了联邦时，其他集群同步到删除后，也解决这个来源在那边开着的事件。

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

成功时返回 `200` 和文本 `deleted`。

**错误**

| 状态码 | 原因 |
| - | - |
| `403` | Token 缺少 `alerts.sources.manage`。 |
| `404` | 来源不存在。 |


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