Update the marketing settings

PATCH
/v1/marketing_settings

Changes the fields given (null clears one).

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Header Parameters

Coss-Version?"2026-10-10"

The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.

Value in"2026-10-10"

Request Body

application/json
  1. body
display_name?|
Length1 <= length <= 200
mailing_address?|
Length1 <= length <= 500
double_opt_in_default?boolean
confirmation_from?string|null
confirmation_subject?|
Length1 <= length <= 998
confirmation_html?|
Lengthlength <= 200000
confirmation_text?|
Lengthlength <= 200000
confirmed_redirect_url?|
Formaturi
Lengthlength <= 2000

Response Body

The settings.

application/json
  1. response
object*"marketing_settings"
Value in"marketing_settings"
display_name*|

The sender's name in the preference center (default: the organization's).

mailing_address*|

The postal address every marketing email carries (CAN-SPAM). Marketing emails can't be sent without one.

double_opt_in_default*boolean

Whether contacts upserted without double_opt_in must confirm first.

confirmation_from*|

The sender of confirmation emails (a verified domain's address for live keys).

confirmation_subject*|

null: coss.com's default.

confirmation_html*|

null: coss.com's default. Must contain {{{confirmation_url}}}.

confirmation_text*|

null: coss.com's default. Must contain {{{confirmation_url}}}.

confirmed_redirect_url*|

Where confirming sends the contact (https); null: a coss.com confirmation page.

import { Coss } from "coss";const coss = new Coss({  apiKey: process.env.COSS_API_KEY,  baseUrl: "https://api.coss.com",});const { data, error } = await coss.email.marketingSettings.update({  mailing_address: "Acme Inc., 548 Market St, San Francisco, CA 94104, USA",});
{  "object": "marketing_settings",  "display_name": "Acme",  "mailing_address": "Acme Inc., 548 Market St, San Francisco, CA 94104, USA",  "double_opt_in_default": true,  "confirmation_from": "Acme <news@acme.com>",  "confirmation_subject": null,  "confirmation_html": null,  "confirmation_text": null,  "confirmed_redirect_url": "https://acme.com/welcome"}