MarketingPreferences

Create a marketing preference

This endpoint creates a new marketing preference for an organisation.

post/customers/marketing-preferences

Request body

textstring required

The text of the marketing preference

localestring required

The locale this marketing preference's text is written in. A marketing preference only ever has one language; to offer the same preference in multiple languages, create a separate marketing preference per locale.

This must be one of the platform's supported locales, which can be retrieved using the listMetaSupportedLocales endpoint.

site_idstring uuid

Optional site that this marketing preference applies to. When set, only customers signing up at this site are offered the opt-in; leave blank to apply the preference across every site in the organisation.

organisation_idstring uuid required

Identifier of the organisation that owns this marketing preference. Preferences are inherited by every site in the organisation unless site_id narrows the scope.

Example request

{
  "text": "I want to receive emails about special offers",
  "locale": "en"
}

Response

The marketing preference was successfully retrieved

Example response

{
  "data": {
    "text": "I want to receive emails about special offers",
    "locale": "en"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.