Documentation · API reference
PUT/api/v1/sites/{site}/banner/draft

Save the draft

Save the draft. It may fail the rules; the answer says which.

Parameters

sitein the address
neededA site's id or name

What to send

any

The answer

Status 200

BannerView

asks_again
booleanneededFor a draft: publishing it asks everyone again. For a published version: it did.
config
objectneeded
created_at
integerneededUnix seconds.
publishable
booleanneeded
published_at
integer or null
rules
list of objectneededThe rules, each with what was found (CB-02, CB-03, CB-13).
state
stringneeded`draft`, `live` or `retired`.
version
integerneeded

Asking

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