# Delete an alert channel

`DELETE /api/v1/alert-channels/{channelId}`

Deletes the channel; what was waiting to be sent to it is dropped. A project admin who is not a workspace owner or admin, deleting a channel another project picked too, only drops it from their project.

Sign-in: a dashboard session, an API token with `alerts:write` or the `monitorly` CLI's sign-in with `alerts:write`.

Section: Alert channels. Operation id in openapi.json: `remove_alert_channel`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `channelId` | path | yes | string (uuid) | The alert channel's id, or a linked Telegram chat's. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 204

Deleted.

### 400

Bad Request.

- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.scope_missing`: the token lacks the scope this needs; `detail` names it
- `request.origin_mismatch`, `request.header_required`: a changing request with a session comes from another site or lacks `X-Monitorly-Request: 1`

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 429

Too Many Requests.

- `token.rate_limited`: more than 10 requests a second with this token
- `session.rate_limited`: more than 5 changes a second from your sessions

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
