Documentation · API reference
PATCH
/api/v1/groups/{id}Change a group
This page as Markdown, or in an AI chatMore ways to read this page
Rename a group, or change its sites.
# Change a group
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/patch-groups-id
`PATCH /api/v1/groups/{id}`
Rename a group, or change its sites.
## What to send
`GroupBody`: A group made, or changed: its name, its sites (by name or id) in place of what it had, or sites put in and taken out.
- `add` (list of string)
- `name` (string or null)
- `remove` (list of string)
- `sites` (list of string or null)
## The answer
200, `GroupView`: A workspace's own group of sites (doc/all-sites.md §3.3).
- `created_at` (string, needed): RFC 3339.
- `id` (string, needed)
- `made_by` (string, needed)
- `name` (string, needed)
- `sites` (list of string, needed): Its sites by name, those the caller may open, in the order they were put in.
## Asking
```sh
curl -X PATCH https://tidekeeper.eu/api/v1/groups/{id} \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
What to send
GroupBody A group made, or changed: its name, its sites (by name or id) in place of what it had, or sites put in and taken out.
- add
- list of string
- name
- string or null
- remove
- list of string
- sites
- list of string or null
The answer
Status 200
GroupView A workspace's own group of sites (doc/all-sites.md §3.3).
- created_at
- stringneededRFC 3339.
- id
- stringneeded
- made_by
- stringneeded
- name
- stringneeded
- sites
- list of stringneededIts sites by name, those the caller may open, in the order they were put in.
Asking
curl -X PATCH https://tidekeeper.eu/api/v1/groups/{id} \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/groups/{id}", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());