Documentation · API reference
PUT
/api/v1/sites/{site}/shareChange what a site shares
This page as Markdown, or in an AI chatMore ways to read this page
Change what a site shares.
# Change what a site shares
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/put-sites-site-share
`PUT /api/v1/sites/{site}/share`
Change what a site shares.
## Parameters
- `site` (in path, needed): The site's id or name
## What to send
`ShareChange`
- `floor` (integer or null)
- `settings` (object, needed)
## The answer
200, `ShareAdmin`: What the Sharing screen shows and changes.
- `address` (string, needed): Where the public dashboard is, on or off.
- `floor` (integer, needed): A row with fewer visitors than this is folded into "other".
- `links` (list of ShareLinkView, needed)
- `never` (list of string, needed): What is never in a shared view, whatever is ticked.
- `now` (integer, needed)
- `panels` (list of PanelView, needed)
- `settings` (object, needed)
- `site` (string, needed)
## Asking
```sh
curl -X PUT https://tidekeeper.eu/api/v1/sites/example.org/share \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"settings": {}}'
```
Parameters
- sitein the address
- neededThe site's id or name
What to send
ShareChange
- floor
- integer or null
- settings
- objectneeded
The answer
Status 200
ShareAdmin What the Sharing screen shows and changes.
- address
- stringneededWhere the public dashboard is, on or off.
- floor
- integerneededA row with fewer visitors than this is folded into "other".
- links
- list of ShareLinkViewneeded
- never
- list of stringneededWhat is never in a shared view, whatever is ticked.
- now
- integerneeded
- panels
- list of PanelViewneeded
- settings
- objectneeded
- site
- stringneeded
Asking
curl -X PUT https://tidekeeper.eu/api/v1/sites/example.org/share \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"settings": {}}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/share", { method: "PUT", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"settings": {}}), }).then((r) => r.json());