GDPR cookie consent banner configuration and visitor consent statistics.

3 endpoints

Get cookie consent settings

Returns the consent banner configuration (categories, texts, appearance).

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

Examples

Bash
curl https://api.lynkow.com/v1/cookie-consent/settings \
  -H "Authorization: Bearer $API_TOKEN"

Response Example

JSON
{
  "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"
    }
  }
}

Update cookie consent settings

Updates the consent banner configuration.

Request Body

Content-Type: application/json

Field

Type

Required

Description

enabled

boolean

No

Boolean

consentMode

"opt-in" | "opt-out" | "notice-only"

No

One of: opt-in, opt-out, notice-only

showOnFirstVisit

boolean

No

Boolean

position

"bottom" | "top" | "center" | "bottom-left" | "bottom-right"

No

One of: bottom, top, center, bottom-left, bottom-right

layout

"banner" | "modal" | "floating"

No

One of: banner, modal, floating

theme

"light" | "dark" | "auto"

No

One of: light, dark, auto

primaryColor

string

No

Primary brand color (hex)

borderRadius

number

No

Between 0 and 50

fontSize

number

No

Between 11 and 17

showCustomizeButton

boolean

No

Boolean

themeStyles

object

No

Custom theme style overrides

texts

object

No

UI text content

categories

object[]

No

Array of objects

privacyPolicyUrl

string | null

No

Privacy policy page URL

cookiePolicyUrl

string | null

No

Cookie policy page URL

thirdPartyScripts

object[]

No

Array of objects

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

422

Validation error

Response Example

JSON
{
  "data": {
    "enabled": true,
    "position": "bottom",
    "categories": [
      {
        "key": "necessary",
        "label": "Necessary",
        "required": true
      },
      {
        "key": "analytics",
        "label": "Analytics",
        "required": false
      }
    ]
  }
}

Get consent statistics

Returns aggregate consent stats: acceptance rate per category, total interactions, and opt-in/opt-out breakdown.

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

Examples

Bash
curl https://api.lynkow.com/v1/cookie-consent/stats \
  -H "Authorization: Bearer $API_TOKEN"

Response Example

JSON
{
  "totalInteractions": 5420,
  "acceptAll": 3850,
  "rejectAll": 420,
  "custom": 1150,
  "byCategory": {
    "necessary": 5420,
    "analytics": 4200,
    "marketing": 2100
  }
}