Update the current customer's marketing consent
Opts the signed-in customer in or out of marketing on one channel, or on every channel with `channel: "all"`. Send `optIn: true` to opt in and `optIn: false` to opt out. On an opt-in, the optional `locale` and `consentVersion` record the language and version of the consent text the buyer saw. An opt-out ignores them and keeps the record of the earlier opt-in. Returns 200 with the updated `{ channels }`. A customer whose email is not verified gets 403 `CUSTOMER_EMAIL_NOT_VERIFIED`. Without a valid session token, returns 401 `CUSTOMER_AUTH_REQUIRED`. > **Note:** Available only on sites with e-commerce enabled.
/customers/me/marketing-consenthttps://api.lynkow.com/storefront/{siteId}Request bodyrequired
channelenumrequiredRequired. One of: whatsapp, email, all
One of:
whatsappemailalloptInbooleanrequiredRequired. Opt-in verb: true re-opts the channel in, false opts it out (opt-out always wins).
consentVersionstringLabel of the consent text shown, recorded with an opt-in. Cut to 100 characters; an unusable value is ignored.
localestringLanguage of the consent text, recorded with an opt-in. An opt-out or an unusable value is ignored