Documentation · API reference
PATCH
/api/v1/channels/{id}Rename a channel
This page as Markdown, or in an AI chatMore ways to read this page
Rename a channel, point it elsewhere, switch it off, or choose which alerts it is told about.
# Rename a channel
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/patch-channels-id
`PATCH /api/v1/channels/{id}`
Rename a channel, point it elsewhere, switch it off, or choose which alerts it is told about.
## What to send
`ChannelUpdate`
- `config` (object or null)
- `disabled` (boolean or null)
- `kinds` (list of string or null)
- `name` (string or null)
## The answer
200, `ChannelView`: Somewhere alerts go. Its secrets are never sent back: `target` says where it points with them left out.
- `created_at` (string, needed)
- `declared` (boolean, needed): From the instance's configuration: not edited here.
- `disabled` (boolean, needed)
- `id` (string, needed)
- `kind` (string, needed): `alertmanager`, `email`, `webhook`, `ntfy`, `discord`, `slack`, `telegram`.
- `kinds` (list of string, needed): The alerts this channel is told about: its row of the matrix.
- `name` (string, needed)
- `target` (string, needed)
## Asking
```sh
curl -X PATCH https://tidekeeper.eu/api/v1/channels/{id} \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
What to send
ChannelUpdate
- config
- object or null
- disabled
- boolean or null
- kinds
- list of string or null
- name
- string or null
The answer
Status 200
ChannelView Somewhere alerts go. Its secrets are never sent back: `target` says where it points with them left out.
- created_at
- stringneeded
- declared
- booleanneededFrom the instance's configuration: not edited here.
- disabled
- booleanneeded
- id
- stringneeded
- kind
- stringneeded`alertmanager`, `email`, `webhook`, `ntfy`, `discord`, `slack`, `telegram`.
- kinds
- list of stringneededThe alerts this channel is told about: its row of the matrix.
- name
- stringneeded
- target
- stringneeded
Asking
curl -X PATCH https://tidekeeper.eu/api/v1/channels/{id} \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/channels/{id}", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());