Documentation · API reference
POST
/api/v1/sites/{site}/offerPost offer
This page as Markdown, or in an AI chatMore ways to read this page
# Post offer
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-site-offer
`POST /api/v1/sites/{site}/offer`
## What to send
`OfferSite`: Typed to confirm: the site's name.
- `confirm` (string, needed)
## The answer
201, `SiteOffered`
- `code` (string, needed): Shown once. Whoever types it into their account takes the site.
- `expires` (integer, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/offer \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": "…"}'
```
What to send
OfferSite Typed to confirm: the site's name.
- confirm
- stringneeded
The answer
Status 201
SiteOffered
- code
- stringneededShown once. Whoever types it into their account takes the site.
- expires
- integerneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/offer \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"confirm": "…"}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/offer", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"confirm": "…"}), }).then((r) => r.json());