Skip to content

Consent

consent_config_theme_upsert

Adapts the consent banner's appearance to the site's brand.

Tool

Adapts the consent banner's appearance to the site's brand.

Adapts the consent banner's appearance to the site's brand. Pass what you observe on the client's site: brandColor — the site's primary brand color (any CSS color); surface — whether the site is "light" or "dark"; corners — button corner shape ("sharp" / "rounded" / "pill"); font — the site's font, given as a font name, a full CSS font stack, or "inherit" to adopt the host page's font. If the brand tokens are not enough, fine-tune `overrides`: backgroundColor, textColor, borderColor, focusColor, dangerColor, successColor, warningColor. All fields are optional and patch-merge onto the previous theme. To identify the site: use a URL from the request; otherwise the latest decision `pageUrl`; otherwise ask the user once. This layer is cosmetic only — after applying, "Accept all" and "Reject all" stay equally prominent and the provider list is unchanged.

HTTP
PATCH /consent/config/theme

Arguments

NameTypeRequiredDescription
fontstringNo description in the catalog.
cornersstringNo description in the catalog.
surfacestringNo description in the catalog.
overridesobjectNo description in the catalog.
brandColorstringNo description in the catalog.

Response

FieldTypeAlwaysDescription
themeobject
themeInputobject

Try it

Adapts the consent banner's appearance to the site's brand.

When to use

Adapts the consent banner's appearance to the site's brand. Pass what you observe on the client's site: brandColor — the site's primary brand color (any CSS color); surface — whether the site is "light" or "dark"; corners — button corner shape ("sharp" / "rounded" / "pill"); font — the site's font, given as a font name, a full CSS font stack, or "inherit" to adopt the host page's font. If the brand tokens are not enough, fine-tune `overrides`: backgroundColor, textColor, borderColor, focusColor, dangerColor, successColor, warningColor. All fields are optional and patch-merge onto the previous theme. To identify the site: use a URL from the request; otherwise the latest decision `pageUrl`; otherwise ask the user once. This layer is cosmetic only — after applying, "Accept all" and "Reject all" stay equally prominent and the provider list is unchanged.

Example

Ask your agent something like this:

Adapts the consent banner's appearance to the site's brand.

The agent will invoke consent_config_theme_upsert with these arguments:

{}

Esc

Start typing to search the docs.

navigateselect