Create preference

Creates a new preference or a new preference category


This operation creates either a new preference or a new preference category.

  • Preferences that are inside the same category must have unique private names
  • Uncategorised preferences must have unique private names
  • All categories must have unique private names
  • Preferences and categories can have the same public names

Creating a preference outside of a category

  1. Set the value of the isPreference to true
  2. Set the value of the CategoryId to null

Creating a preference inside a category

  1. Set the value of the isPreference to true
  2. Set the value of the CategoryId to the ID of an existing category

Creating a preference category

  1. Set the value of the isPreference to false
  2. Set the value of isPublic to true
  3. Set the value of the CategoryId to a unique integer

Body Params
string
required

The public name of the preference or the preference category. Contacts can see the public names of preferences in preference centres and signup forms.

string
required

The private name of the preference or the preference category. Contacts can't see private names in the preference centre or in signup forms.

boolean
Defaults to false

If this value is true, a new preference is created. If this value is false, a new preference category is created.

string

The position that you want the preference or the preference category to appear on the 'Contact preferences' page, starting from 0. Specify either an integer for absolute position, alternatively use "top" or "bottom"

boolean
Defaults to true

For preferences, if this value is true, the preference is visible in signup forms and preference centres.

int32

For preferences, the unique ID of the preference category that you want to add the preference to. Default for preferences: 0. Default for preference categories: null

Headers
string
/^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/

If you are a partner of Dotdigital and have a verified integration then include your integration tracking token here.

Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json