Documentation · API reference
POST
/api/v1/sites/{site}/hard/offTurn hard mode off, and say what happens to what was collected
This page as Markdown, or in an AI chatMore ways to read this page
Turn hard mode off, and say what happens to what was collected. Typed to confirm.
# Turn hard mode off, and say what happens to what was collected
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-site-hard-off
`POST /api/v1/sites/{site}/hard/off`
Turn hard mode off, and say what happens to what was collected. Typed to confirm.
## Parameters
- `site` (in path, needed): A site's id or name
## What to send
`HardOff`
- `choice` (string, needed)
- `confirm` (string, needed): The site's name, typed.
## The answer
200, `RemovedView`
- `hits` (integer, needed)
- `visitors` (integer, needed)
- `visits` (integer, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/hard/off \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"choice": "…", "confirm": "…"}'
```
Parameters
- sitein the address
- neededA site's id or name
What to send
HardOff
- choice
- stringneeded
- confirm
- stringneededThe site's name, typed.
The answer
Status 200
RemovedView
- hits
- integerneeded
- visitors
- integerneeded
- visits
- integerneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/hard/off \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"choice": "…", "confirm": "…"}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/hard/off", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"choice": "…", "confirm": "…"}), }).then((r) => r.json());