Documentation · API reference
PUT
/api/v1/sites/{site}/banner/draftSave the draft
This page as Markdown, or in an AI chatMore ways to read this page
Save the draft. It may fail the rules; the answer says which.
# Save the draft
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/put-sites-site-banner-draft
`PUT /api/v1/sites/{site}/banner/draft`
Save the draft. It may fail the rules; the answer says which.
## Parameters
- `site` (in path, needed): A site's id or name
## What to send
`any`
## The answer
200, `BannerView`
- `asks_again` (boolean, needed): For a draft: publishing it asks everyone again. For a published version: it did.
- `config` (object, needed)
- `created_at` (integer, needed): Unix seconds.
- `publishable` (boolean, needed)
- `published_at` (integer or null)
- `rules` (list of object, needed): The rules, each with what was found (CB-02, CB-03, CB-13).
- `state` (string, needed): `draft`, `live` or `retired`.
- `version` (integer, needed)
## Asking
```sh
curl -X PUT https://tidekeeper.eu/api/v1/sites/example.org/banner/draft \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
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
curl -X PUT https://tidekeeper.eu/api/v1/sites/example.org/banner/draft \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
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());