> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# UpdateCookieBannerSettings

# Package: cookieConsentPolicy

# Namespace: CookieBannerSettingsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/cookie-consent-policy/cookie-banner-settings/update-cookie-banner-settings.md

## Permission Scopes:
Manage Cookie Consent Banner: SCOPE.COOKIE-CONSENT-BANNER.MANAGE

## Introduction

Updates the cookie banner settings.

---

## REST API

### Schema

```
 Method: updateCookieBannerSettings
 Description: Updates the cookie banner settings.
 URL: https://www.wixapis.com/wixpress/cookie-banner-settings/v1/cookie-banner-settings/update
 Method: POST
 Method parameters:
   param name: settings | type: CookieBannerSettings    
        - name: cookiePolicyRequirementApproved | type: boolean | description: Whether the site contributor has acknowledged the consent policy requirements.  
        - name: declineAllConfig | type: DeclineAllConfig | description: Configuration settings for the "decline all" button.  
           - name: enabled | type: boolean | description: Whether to show the "decline all" button on the cookie banner.  
        - name: expiryDate | type: string | description: For internal use.  | validation: format date-time
        - name: texts | type: object | description: Texts to be displayed on the cookie banner. See [Banner texts]() for details.  | validation: format map
        - name: theme | type: Theme | description: Visual theme.  
             - enum: unknown_theme, light, dark, custom
        - name: revisitSettingsConfig | type: RevisitSettingsConfig | description: Configuration settings for the "revisit settings" button.  
           - name: enabled | type: boolean | description: Whether to show a minimized cookie banner on all pages at all times.  
           - name: buttonPosition | type: ButtonPosition | description: Position of the minimized cookie banner.  
                 - enum: unknown_button_position, bottom_right, bottom_left, center_right, center_left
        - name: customThemeConfig | type: CustomThemeConfig | description: Custom theme configuration.  
           - name: primaryColor | type: SiteColor | description: Primary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
              - name: name | type: string | description: Color name.  
              - name: value | type: string | description: Color value in [hex](https://www.color-hex.com/color-palette/1018144) format.  
           - name: secondaryColor | type: SiteColor | description: Secondary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
           - name: fontFamily | type: string | description: Font displayed on the cookie banner.  
           - name: fontSize | type: string | description: Font size displayed on the cookie banner.  
           - name: cornerRadius | type: CornerRadius | description: Corner style for buttons on the cookie banner.  
                 - enum: unknown_corner_radius, square, rounded_corners, round
        - name: enabled | type: boolean | description: Whether the banner is activated.  
        - name: privacyPolicyPageInfo | type: PrivacyPolicyPageInfo | description: Location of the site's privacy policy.  
           - ONE-OF: 
              - name: slugDetails | type: SlugDetails | description: Internal page slug containing the privacy policy.  
                 - name: slug | type: string | description: Slug of the site page containing the privacy policy.  | validation: format URL_SLUG
              - name: externalPageUrlDetails | type: ExternalPageUrlDetails | description: External URL containing the privacy policy.  
                 - name: externalPageUrl | type: string | description: URL of the external page containing the privacy policy.  | validation: format WEB_URL
           - name: privacyPolicyDetailsReferenceType | type: PrivacyPolicyDetailsReferenceType | description:   
                 - enum: UNKNOWN_PRIVACY_POLICY_TYPE, SLUG, EXTERNAL_PAGE_URL
 Return type: UpdateCookieBannerSettingsResponse
  - name: settings | type: CookieBannerSettings | description: Updated cookie banner settings.  
     - name: cookiePolicyRequirementApproved | type: boolean | description: Whether the site contributor has acknowledged the consent policy requirements.  
     - name: declineAllConfig | type: DeclineAllConfig | description: Configuration settings for the "decline all" button.  
        - name: enabled | type: boolean | description: Whether to show the "decline all" button on the cookie banner.  
     - name: expiryDate | type: string | description: For internal use.  | validation: format date-time
     - name: texts | type: object | description: Texts to be displayed on the cookie banner. See [Banner texts]() for details.  | validation: format map
     - name: theme | type: Theme | description: Visual theme.  
         - enum: unknown_theme, light, dark, custom
     - name: revisitSettingsConfig | type: RevisitSettingsConfig | description: Configuration settings for the "revisit settings" button.  
        - name: enabled | type: boolean | description: Whether to show a minimized cookie banner on all pages at all times.  
        - name: buttonPosition | type: ButtonPosition | description: Position of the minimized cookie banner.  
             - enum: unknown_button_position, bottom_right, bottom_left, center_right, center_left
     - name: customThemeConfig | type: CustomThemeConfig | description: Custom theme configuration.  
        - name: primaryColor | type: SiteColor | description: Primary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
           - name: name | type: string | description: Color name.  
           - name: value | type: string | description: Color value in [hex](https://www.color-hex.com/color-palette/1018144) format.  
        - name: secondaryColor | type: SiteColor | description: Secondary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
        - name: fontFamily | type: string | description: Font displayed on the cookie banner.  
        - name: fontSize | type: string | description: Font size displayed on the cookie banner.  
        - name: cornerRadius | type: CornerRadius | description: Corner style for buttons on the cookie banner.  
             - enum: unknown_corner_radius, square, rounded_corners, round
     - name: enabled | type: boolean | description: Whether the banner is activated.  
     - name: privacyPolicyPageInfo | type: PrivacyPolicyPageInfo | description: Location of the site's privacy policy.  
        - ONE-OF: 
           - name: slugDetails | type: SlugDetails | description: Internal page slug containing the privacy policy.  
              - name: slug | type: string | description: Slug of the site page containing the privacy policy.  | validation: format URL_SLUG
           - name: externalPageUrlDetails | type: ExternalPageUrlDetails | description: External URL containing the privacy policy.  
              - name: externalPageUrl | type: string | description: URL of the external page containing the privacy policy.  | validation: format WEB_URL
        - name: privacyPolicyDetailsReferenceType | type: PrivacyPolicyDetailsReferenceType | description:   
             - enum: UNKNOWN_PRIVACY_POLICY_TYPE, SLUG, EXTERNAL_PAGE_URL


```

### Examples

### Update Cookie Banner Settings - OAuth
Update a site's cookie banner settings using OAuth

```curl
curl -X POST 'https://www.wixapis.com/wixpress/cookie-banner-settings/v1/cookie-banner-settings/update' \
    -H 'Authorization: <AUTH>' \
    -d '{
            "settings": {
                "cookiePolicyRequirementApproved": true,
                "texts": {
                    "accept.cookies.button": "Accept",
                    "open.settings.button": "Settings",
                    "view.privacy.policy": "Privacy Policy",
                    "decline.all.button": "Decline All",
                    "policy.banner.text": "We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies.",
                    "policy.external.url": " ",
                    "display.save.default": "Save",
                    "revisit.settings.text": "Cookie settings",
                    "advanced.category.essential.headline": "Essential Cookies",
                    "advanced.category.essential.paragraph": "These cookies enable core functionality such as security, verification of identity and network management. These cookies can'\''t be disabled.",
                    "advanced.category.marketing.headline": "Enable Marketing Cookies",
                    "advanced.category.marketing.paragraph": "These cookies are used to track advertising effectiveness to provide a more relevant service and deliver better ads to suit your interests.",
                    "advanced.category.functional.headline": "Enable Functional Cookies",
                    "advanced.category.functional.paragraph": "These cookies collect data to remember choices users make to improve and give a more personalised experience. ",
                    "advanced.category.analytics.headline": "Enable Analytics Cookies",
                    "advanced.category.analytics.paragraph": "These cookies help us to understand how visitors interact with our website, discover errors and provide a better overall analytics."
                },
                "theme": "custom",
                "audience": "all_visitors",
                "declineAllConfig": {
                    "enabled": false
                },
                "revisitSettingsConfig": {
                    "enabled": false,
                    "buttonPosition": "bottom_left"
                },
                "expiryDate": "1970-01-01T00:00:00.000Z",
                "enabled": false,
                "customThemeConfig": {
                    "primaryColor": {
                        "value": "#60A672"
                    },
                    "secondaryColor": {
                        "value": "#C23F3F"
                    },
                    "fontFamily": "\"helvetica-w01-light\",\"helvetica-w02-light\",sans-serif",
                    "fontSize": "15px"
                }
            }
        }'
```

### Update Cookie Banner Settings - API key
Update a site's cookie banner settings using an API key

```curl
curl -X POST 'https://www.wixapis.com/wixpress/cookie-banner-settings/v1/cookie-banner-settings/update' \
    -H 'Authorization: <AUTH>' \
    -H 'wix-site-id: <SITEID>' \
    -d '{
            "settings": {
                "cookiePolicyRequirementApproved": true,
                "texts": {
                    "accept.cookies.button": "Accept",
                    "open.settings.button": "Settings",
                    "view.privacy.policy": "Privacy Policy",
                    "decline.all.button": "Decline All",
                    "policy.banner.text": "We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies.",
                    "policy.external.url": " ",
                    "display.save.default": "Save",
                    "revisit.settings.text": "Cookie settings",
                    "advanced.category.essential.headline": "Essential Cookies",
                    "advanced.category.essential.paragraph": "These cookies enable core functionality such as security, verification of identity and network management. These cookies can't be disabled.",
                    "advanced.category.marketing.headline": "Enable Marketing Cookies",
                    "advanced.category.marketing.paragraph": "These cookies are used to track advertising effectiveness to provide a more relevant service and deliver better ads to suit your interests.",
                    "advanced.category.functional.headline": "Enable Functional Cookies",
                    "advanced.category.functional.paragraph": "These cookies collect data to remember choices users make to improve and give a more personalised experience. ",
                    "advanced.category.analytics.headline": "Enable Analytics Cookies",
                    "advanced.category.analytics.paragraph": "These cookies help us to understand how visitors interact with our website, discover errors and provide a better overall analytics."
                },
                "theme": "custom",
                "audience": "all_visitors",
                "declineAllConfig": {
                    "enabled": false
                },
                "revisitSettingsConfig": {
                    "enabled": false,
                    "buttonPosition": "bottom_left"
                },
                "expiryDate": "1970-01-01T00:00:00.000Z",
                "enabled": false,
                "customThemeConfig": {
                    "primaryColor": {
                        "value": "#60A672"
                    },
                    "secondaryColor": {
                        "value": "#C23F3F"
                    },
                    "fontFamily": "\"helvetica-w01-light\",\"helvetica-w02-light\",sans-serif",
                    "fontSize": "15px"
                }
            }
        }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.consentPolicy.cookieBannerSettings.updateCookieBannerSettings(options)
 Description: Updates the cookie banner settings.
 Method parameters:
   param name: options | type: UpdateCookieBannerSettingsOptions  none  
        - name: settings | type: CookieBannerSettings | description: Cookie banner settings to update.  
           - name: cookiePolicyRequirementApproved | type: boolean | description: Whether the site contributor has acknowledged the consent policy requirements.  
           - name: declineAllConfig | type: DeclineAllConfig | description: Configuration settings for the "decline all" button.  
              - name: enabled | type: boolean | description: Whether to show the "decline all" button on the cookie banner.  
           - name: expiryDate | type: Date | description: For internal use.  
           - name: texts | type: object | description: Texts to be displayed on the cookie banner. See [Banner texts]() for details.  | validation: format map
           - name: theme | type: Theme | description: Visual theme.  
                 - enum: unknown_theme, light, dark, custom
           - name: revisitSettingsConfig | type: RevisitSettingsConfig | description: Configuration settings for the "revisit settings" button.  
              - name: enabled | type: boolean | description: Whether to show a minimized cookie banner on all pages at all times.  
              - name: buttonPosition | type: ButtonPosition | description: Position of the minimized cookie banner.  
                     - enum: unknown_button_position, bottom_right, bottom_left, center_right, center_left
           - name: customThemeConfig | type: CustomThemeConfig | description: Custom theme configuration.  
              - name: primaryColor | type: SiteColor | description: Primary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
                 - name: name | type: string | description: Color name.  
                 - name: value | type: string | description: Color value in [hex](https://www.color-hex.com/color-palette/1018144) format.  
              - name: secondaryColor | type: SiteColor | description: Secondary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
              - name: fontFamily | type: string | description: Font displayed on the cookie banner.  
              - name: fontSize | type: string | description: Font size displayed on the cookie banner.  
              - name: cornerRadius | type: CornerRadius | description: Corner style for buttons on the cookie banner.  
                     - enum: unknown_corner_radius, square, rounded_corners, round
           - name: enabled | type: boolean | description: Whether the banner is activated.  
           - name: privacyPolicyPageInfo | type: PrivacyPolicyPageInfo | description: Location of the site's privacy policy.  
              - ONE-OF: 
                 - name: slugDetails | type: SlugDetails | description: Internal page slug containing the privacy policy.  
                    - name: slug | type: string | description: Slug of the site page containing the privacy policy.  | validation: format URL_SLUG
                 - name: externalPageUrlDetails | type: ExternalPageUrlDetails | description: External URL containing the privacy policy.  
                    - name: externalPageUrl | type: string | description: URL of the external page containing the privacy policy.  | validation: format WEB_URL
              - name: privacyPolicyDetailsReferenceType | type: PrivacyPolicyDetailsReferenceType | description:   
                     - enum: UNKNOWN_PRIVACY_POLICY_TYPE, SLUG, EXTERNAL_PAGE_URL
 Return type: PROMISE<UpdateCookieBannerSettingsResponse>
  - name: settings | type: CookieBannerSettings | description: Updated cookie banner settings.  
     - name: cookiePolicyRequirementApproved | type: boolean | description: Whether the site contributor has acknowledged the consent policy requirements.  
     - name: declineAllConfig | type: DeclineAllConfig | description: Configuration settings for the "decline all" button.  
        - name: enabled | type: boolean | description: Whether to show the "decline all" button on the cookie banner.  
     - name: expiryDate | type: Date | description: For internal use.  
     - name: texts | type: object | description: Texts to be displayed on the cookie banner. See [Banner texts]() for details.  | validation: format map
     - name: theme | type: Theme | description: Visual theme.  
         - enum: unknown_theme, light, dark, custom
     - name: revisitSettingsConfig | type: RevisitSettingsConfig | description: Configuration settings for the "revisit settings" button.  
        - name: enabled | type: boolean | description: Whether to show a minimized cookie banner on all pages at all times.  
        - name: buttonPosition | type: ButtonPosition | description: Position of the minimized cookie banner.  
             - enum: unknown_button_position, bottom_right, bottom_left, center_right, center_left
     - name: customThemeConfig | type: CustomThemeConfig | description: Custom theme configuration.  
        - name: primaryColor | type: SiteColor | description: Primary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
           - name: name | type: string | description: Color name.  
           - name: value | type: string | description: Color value in [hex](https://www.color-hex.com/color-palette/1018144) format.  
        - name: secondaryColor | type: SiteColor | description: Secondary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format.  
        - name: fontFamily | type: string | description: Font displayed on the cookie banner.  
        - name: fontSize | type: string | description: Font size displayed on the cookie banner.  
        - name: cornerRadius | type: CornerRadius | description: Corner style for buttons on the cookie banner.  
             - enum: unknown_corner_radius, square, rounded_corners, round
     - name: enabled | type: boolean | description: Whether the banner is activated.  
     - name: privacyPolicyPageInfo | type: PrivacyPolicyPageInfo | description: Location of the site's privacy policy.  
        - ONE-OF: 
           - name: slugDetails | type: SlugDetails | description: Internal page slug containing the privacy policy.  
              - name: slug | type: string | description: Slug of the site page containing the privacy policy.  | validation: format URL_SLUG
           - name: externalPageUrlDetails | type: ExternalPageUrlDetails | description: External URL containing the privacy policy.  
              - name: externalPageUrl | type: string | description: URL of the external page containing the privacy policy.  | validation: format WEB_URL
        - name: privacyPolicyDetailsReferenceType | type: PrivacyPolicyDetailsReferenceType | description:   
             - enum: UNKNOWN_PRIVACY_POLICY_TYPE, SLUG, EXTERNAL_PAGE_URL


```

### Examples

### updateCookieBannerSettings
```javascript
import { cookieBannerSettings } from '@wix/consent-policy';

async function updateCookieBannerSettings(options) {
  const response = await cookieBannerSettings.updateCookieBannerSettings(options);
};
```

### updateCookieBannerSettings (with elevated permissions)
```javascript
import { cookieBannerSettings } from '@wix/consent-policy';
import { auth } from '@wix/essentials';

async function myUpdateCookieBannerSettingsMethod(options) {
  const elevatedUpdateCookieBannerSettings = auth.elevate(cookieBannerSettings.updateCookieBannerSettings);
  const response = await elevatedUpdateCookieBannerSettings(options);
}
```

### updateCookieBannerSettings (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { cookieBannerSettings } from '@wix/consent-policy';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { cookieBannerSettings },
  // Include the auth strategy and host as relevant
});


async function updateCookieBannerSettings(options) {
  const response = await myWixClient.cookieBannerSettings.updateCookieBannerSettings(options);
};
```

---