Documentation · API reference
GET/api/v1/sites/{site}/consent

How many were asked and what they answered, day by day

How many were asked and what they answered, day by day.

Parameters

sitein the address
neededA site's id or name
periodin the query
7d, 30d, all, or two dates

The answer

Status 200

ConsentSummary The consent log's figures (CR-06).

agreed
integerneeded
asked
integerneededThe banner was shown.
by_device
list of ConsentSplitneeded
by_language
list of ConsentSplitneeded
by_version
list of ConsentSplitneeded
days
list of ConsentDayneeded
declined
integerneeded
gpc
integerneededNever asked: the browser sent Global Privacy Control.
period
PeriodViewneeded
site
stringneeded
unanswered
integerneededShown, and neither answer given. Treated as a no.
withdrew
integerneeded

Asking

With your token from Settings
curl https://tidekeeper.eu/api/v1/sites/example.org/consent \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/consent", {
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
  },
}).then((r) => r.json());