Documentation · API reference
POST
/api/v1/sites/bulkOne change to several sites
This page as Markdown, or in an AI chatMore ways to read this page
One change to several sites, answered site by site.
# One change to several sites
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-bulk
`POST /api/v1/sites/bulk`
One change to several sites, answered site by site.
## What to send
`BulkChange`: One change to several sites (doc/all-sites.md §3.6).
- `change` (string, needed): `time_zone`, `keep_days`, `regions`, `pause`, `resume`, `copy_goals`, `note`, `group_add` or `group_remove`.
- `day` (string): A note's day, `2026-10-28`; today when left out.
- `from` (string): The site goals are copied from; a new group's name.
- `name` (string)
- `sites` (list of string, needed): The sites, by name or id.
- `value` (string): What it is changed to: a time zone, days, `on` or `off`, a note's words, a group's id (or, to put the sites in a new group, empty with `name`).
## The answer
200, `BulkResult`: What a change to several sites did, site by site.
- `change` (string, needed)
- `done` (list of string, needed)
- `refused` (list of BulkRefusal, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/bulk \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"change": "…", "sites": []}'
```
What to send
BulkChange One change to several sites (doc/all-sites.md §3.6).
- change
- stringneeded
time_zone,keep_days,regions,pause,resume,copy_goals,note,group_addorgroup_remove. - day
- stringA note's day,
2026-10-28; today when left out. - from
- stringThe site goals are copied from; a new group's name.
- name
- string
- sites
- list of stringneededThe sites, by name or id.
- value
- stringWhat it is changed to: a time zone, days,
onoroff, a note's words, a group's id (or, to put the sites in a new group, empty withname).
The answer
Status 200
BulkResult What a change to several sites did, site by site.
- change
- stringneeded
- done
- list of stringneeded
- refused
- list of BulkRefusalneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/bulk \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"change": "…", "sites": []}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/bulk", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"change": "…", "sites": []}), }).then((r) => r.json());