Configuration API
Manage consent configuration and multi-language banner text programmatically.
Consent Configuration
GET /api/v1/sites/:siteId/config Get consent config
Returns the full consent configuration and all banner texts for the site.
Response
{
"config": {
"id": "01HXYZ...",
"site_id": "01HABC...",
"banner_layout": "bottom-bar",
"banner_config": {
"primaryColor": "#627D98",
"accentColor": "#27AB83",
"textColor": "#2D3748",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"showPoweredBy": true
},
"consent_mode": "full-blocking",
"gcm_enabled": 1,
"gtm_enabled": 1,
"gcm_url_passthrough": 0,
"gcm_ads_data_redaction": 0,
"geo_rules": {
"eu": { "mode": "opt-in", "showBanner": true },
"california": { "mode": "opt-out", "showBanner": true },
"default": { "mode": "opt-in", "showBanner": true }
},
"default_language": "en",
"version": 3,
"is_published": 1
},
"texts": [
{ "language": "en", "headline": "We use cookies", "..." : "..." }
]
} PUT /api/v1/sites/:siteId/config Update consent config
Updates the consent configuration. All fields are optional — only include fields you want to change. Changes are saved as a draft. You must publish to push them live.
Request Body
{
"bannerLayout": "modal",
"bannerConfig": {
"primaryColor": "#1A73E8",
"accentColor": "#34A853",
"textColor": "#202124",
"backgroundColor": "#FFFFFF",
"position": "center",
"showPoweredBy": false
},
"consentMode": "full-blocking",
"gcmEnabled": true,
"gtmEnabled": true,
"gcmUrlPassthrough": true,
"gcmAdsDataRedaction": false,
"geoRules": {
"eu": { "mode": "opt-in", "showBanner": true },
"california": { "mode": "opt-out", "showBanner": true },
"default": { "mode": "opt-in", "showBanner": true }
},
"defaultLanguage": "en"
} Response
{
"success": true
} showPoweredBy on free plan
On the free plan, showPoweredBy is always forced to true regardless of what you send. Upgrade to Starter or above to remove the badge.
Banner Texts
GET /api/v1/sites/:siteId/config/texts Get all banner texts
Returns banner texts for all configured languages.
Response
{
"texts": [
{
"language": "en",
"headline": "We use cookies",
"body": "We use cookies to improve your experience...",
"accept_all_label": "Accept All",
"reject_all_label": "Reject All",
"manage_label": "Customize",
"save_label": "Save Preferences"
},
{
"language": "de",
"headline": "Wir verwenden Cookies",
"..."
}
]
} PUT /api/v1/sites/:siteId/config/texts/:language Update banner text for a language
Creates or updates banner text for the specified language code (BCP 47 format, e.g. en, de, pt-BR). If the language doesn’t exist yet, it’s created automatically.
Request Body
{
"headline": "We use cookies",
"body": "We use cookies to improve your browsing experience and analyze site traffic.",
"acceptAllLabel": "Accept All",
"rejectAllLabel": "Reject All",
"manageLabel": "Customize",
"saveLabel": "Save Preferences",
"categoryNecessaryLabel": "Necessary",
"categoryNecessaryDesc": "Essential cookies required for the website to function.",
"categoryAnalyticsLabel": "Analytics",
"categoryAnalyticsDesc": "Help us understand how visitors use our website.",
"categoryMarketingLabel": "Marketing",
"categoryMarketingDesc": "Used to deliver relevant advertisements.",
"categoryFunctionalLabel": "Functional",
"categoryFunctionalDesc": "Enable additional features and personalization."
} Response
{
"success": true
}