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?|

The sender's name in the preference center. null: the organization's.

Length1 <= length <= 200
mailing_address?|

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

Length1 <= length <= 500
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.

Length1 <= length <= 998
confirmation_html?|

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

Lengthlength <= 200000
confirmation_text?|

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

Lengthlength <= 200000
confirmed_redirect_url?|

Where a confirmed contact is sent, an https URL. null: coss.com's own page.

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"}