Update the current customer's marketing consent

The buyer opts a single channel (or `all`) in or out. Opt-out stamps `opt_out_at` (opt-out always wins over any prior opt-in); re-opt-in stamps a fresh `opt_in_at` with `opt_in_source = manual` and clears `opt_out_at`. Writes ONLY the current customer's rows (tenant-scoped); audits `customer.marketing_opted_in` / `customer.marketing_opted_out`. Requires a buyer who has proven inbox control: a session on an unverified row is refused 403 and writes nothing. Behind the publishable key, the `customer_accounts` flag, and the customer-auth middleware. Returns 200 with the refreshed `{ channels }`. > **Note:** This endpoint requires the e-commerce feature to be enabled on your site.

PATCH/customers/me/marketing-consent
Base URLhttps://api.lynkow.com/storefront/{siteId}

Request body
required

  • optIn
    boolean
    required

    Required. Opt-in verb: true re-opts the channel in, false opts it out (opt-out always wins).. Boolean

  • channel
    enum
    required

    Required. One of: whatsapp, email, all

    One of: whatsappemailall

Feedback

Was this page helpful?