Documentation · API reference
POST
/api/v1/groupsMake a group of sites
This page as Markdown, or in an AI chatMore ways to read this page
Make a group of sites.
# Make a group of sites
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-groups
`POST /api/v1/groups`
Make a group of 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
201, `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 POST https://tidekeeper.eu/api/v1/groups \
-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 201
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 POST https://tidekeeper.eu/api/v1/groups \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/groups", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());