Skip to content

Consent

consent_config_cookie_domain_upsert

Sets an explicit cookie Domain for the consent cookie (lessly_consent).

Tool

Sets an explicit cookie Domain for the consent cookie (lessly_consent).

Sets an explicit cookie Domain for the consent cookie (lessly_consent). By default the banner derives the widest owned boundary automatically: the registrable domain (eTLD+1) on customer sites, or the deploy host on Lessly platform hosts — so consent given on site.com also covers docs.site.com. Set cookieDomain only to NARROW that perimeter, e.g. when several Lessly products live on subdomains of one domain and each must keep its own consent (cookieDomain: "docs.site.com" on the docs product). The value must be a suffix of the page hostname at runtime, otherwise the banner ignores it and falls back to auto-derivation. Platform deploy suffixes (lessly.dev / lessly.com / lessly.run / lessly.tech / v2.*) are rejected — a cookie on those would leak consent across tenants. Pass null or an empty string to remove the override.

HTTP
PATCH /consent/config/cookie-domain

Arguments

NameTypeRequiredDescription
cookieDomainstringNo description in the catalog.

Response

FieldTypeAlwaysDescription
cookieDomainstring

Try it

Sets an explicit cookie Domain for the consent cookie (lessly_consent).

When to use

Sets an explicit cookie Domain for the consent cookie (lessly_consent). By default the banner derives the widest owned boundary automatically: the registrable domain (eTLD+1) on customer sites, or the deploy host on Lessly platform hosts — so consent given on site.com also covers docs.site.com. Set cookieDomain only to NARROW that perimeter, e.g. when several Lessly products live on subdomains of one domain and each must keep its own consent (cookieDomain: "docs.site.com" on the docs product). The value must be a suffix of the page hostname at runtime, otherwise the banner ignores it and falls back to auto-derivation. Platform deploy suffixes (lessly.dev / lessly.com / lessly.run / lessly.tech / v2.*) are rejected — a cookie on those would leak consent across tenants. Pass null or an empty string to remove the override.

Example

Ask your agent something like this:

Sets an explicit cookie Domain for the consent cookie (lessly_consent).

The agent will invoke consent_config_cookie_domain_upsert with these arguments:

{
  "cookieDomain": "<cookieDomain>"
}

Esc

Start typing to search the docs.

navigateselect