Documentation · API reference
POST/api/v1/sites-offered

Take a site another account offered

Take a site another account offered, with the code its owner was given.

What to send

TakeSite

code
stringneeded

The answer

Status 200

SiteRef A site by both of its names: the one the API takes and the one people read.

id
stringneeded
name
stringneeded

Asking

With your token from Settings
curl -X POST https://tidekeeper.eu/api/v1/sites-offered \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"code": "…"}'
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/sites-offered", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"code": "…"}),
}).then((r) => r.json());