---
title: "Update Analytics Consent"
method: PUT
path: "/api/me/analytics-consent"
---

# Update Analytics Consent

`PUT /api/me/analytics-consent`

## Request

- Base URL: `https://api.kdpcoloringbook.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kdpcoloringbook.com/api/me/analytics-consent`
- Auth: HTTP bearer

Record the user's cookie-banner decision on their account.

The Dodo webhook reports a purchase to GA only when this says "accepted", so a
GA client id sent by the browser never counts as consent on its own.

## Request body

- AnalyticsConsentUpdate
  - `decision` 'accepted' | 'rejected', required

## Response `200`

Successful Response

- AnalyticsConsentResponse
  - `analytics_consent` 'accepted' | 'rejected', nullable
  - `analytics_consent_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kdpcoloringbook/apis/book-generator-api.md) · [All operations](https://skmtc.dev/kdpcoloringbook/apis/book-generator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kdpcoloringbook/apis/book-generator-api/revisions/f330c566ffc2?raw)
