# Update an alert channel

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

Renames a channel, or turns the workspace's service notifications on or off for a channel or a linked Telegram chat (workspace owner or admin). A chat's name is its Telegram title and cannot be changed here.

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: `update_alert_channel`.

## Parameters

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

## Request body

Required: yes.

`application/json`: AlertChannelPatch

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string \| null | no | 1–100 characters. Not for Telegram chats: their title is Telegram's. |
| `serviceNotifications` | boolean \| null | no | The workspace's service notifications go to the channel or chat (workspace owner or admin). |

## Responses

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

### 200

The channel.

`application/json`: AlertChannelView

| Field | Type | Required | Description |
|---|---|---|---|
| `brokenAt` | string \| null | no |  |
| `brokenReason` | string \| null | no |  |
| `createdAt` | string | yes |  |
| `id` | string (uuid) | yes |  |
| `kind` | ChannelKind | yes |  |
| `lastDeliveredAt` | string \| null | no | The last message the provider accepted; null for Telegram chats and channels that got nothing yet. |
| `lastError` | string \| null | no | The last temporary error (a retry is scheduled), while it is newer than the last delivery. |
| `lastErrorAt` | string \| null | no |  |
| `name` | string | yes |  |
| `projectId` | string (uuid) \| null | no | The project the channel was added in (its project admins may manage it); null for a channel added for the workspace. Which projects' alerts it receives is `projectIds`. |
| `projectIds` | array of string (uuid) | no | The projects whose check alerts go to this channel. In a project's lists only that project can appear here: present when the project picked the channel. Always sent; optional in the schema because it was added after the first clients (2026-11-15). |
| `serviceNotifications` | boolean | no | The workspace's service notifications (nodes, backups) go to this channel too. |
| `status` | ChannelStatus | yes |  |
| `target` | string | yes | The email address, the provider's host (Slack, Discord, Teams, Google Chat, PagerDuty, Pushover), the URL's origin (webhook, Mattermost, the ntfy server) or the Telegram chat title. Never a full URL, a topic or a key. |
| `verifyExpiresAt` | string \| null | no | Unverified email channels: when the confirmation link stops working. |

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `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

### 413

Payload Too Large.

- `request.too_large`: the body is larger than 256 KiB

### 422

Unprocessable Entity.

- `field.required`, `field.too_long`, `field.invalid`: a field breaks a rule; `errors` points at 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).
