GDPR cookie consent banner configuration and visitor consent statistics.
3 endpoints
GET /cookie-consent/settings
Get cookie consent settings
Returns the consent banner configuration (categories, texts, appearance).
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl https://api.lynkow.com/v1/cookie-consent/settings \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": {
"enabled": true,
"position": "bottom",
"categories": [
{
"key": "necessary",
"label": "Necessary",
"required": true
},
{
"key": "analytics",
"label": "Analytics",
"required": false
},
{
"key": "marketing",
"label": "Marketing",
"required": false
}
],
"texts": {
"title": "Cookie Preferences",
"description": "We use cookies to improve your experience.",
"acceptAll": "Accept All",
"rejectAll": "Reject All"
}
}
}PUT /cookie-consent/settings
Update cookie consent settings
Updates the consent banner configuration.
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| boolean | No | Boolean |
| "opt-in" | "opt-out" | "notice-only" | No | One of: opt-in, opt-out, notice-only |
| boolean | No | Boolean |
| "bottom" | "top" | "center" | "bottom-left" | "bottom-right" | No | One of: bottom, top, center, bottom-left, bottom-right |
| "banner" | "modal" | "floating" | No | One of: banner, modal, floating |
| "light" | "dark" | "auto" | No | One of: light, dark, auto |
| string | No | Primary brand color (hex) |
| number | No | Between 0 and 50 |
| number | No | Between 11 and 17 |
| boolean | No | Boolean |
| object | No | Custom theme style overrides |
| object | No | UI text content |
| object[] | No | Array of objects |
| string | null | No | Privacy policy page URL |
| string | null | No | Cookie policy page URL |
| object[] | No | Array of objects |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Validation error |
Response Example
{
"data": {
"enabled": true,
"position": "bottom",
"categories": [
{
"key": "necessary",
"label": "Necessary",
"required": true
},
{
"key": "analytics",
"label": "Analytics",
"required": false
}
]
}
}GET /cookie-consent/stats
Get consent statistics
Returns aggregate consent stats: acceptance rate per category, total interactions, and opt-in/opt-out breakdown.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl https://api.lynkow.com/v1/cookie-consent/stats \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"totalInteractions": 5420,
"acceptAll": 3850,
"rejectAll": 420,
"custom": 1150,
"byCategory": {
"necessary": 5420,
"analytics": 4200,
"marketing": 2100
}
}