POST api/v2.0/Contacts/UpdateEmailPreferences

Change Global Email preferences for 1 or more Contacts. * For use by Administrators only *. Individual users can updated their own Email Preferences via the "UpdateMyEmailPreferences" endpoint.

Request Information

URI Parameters

None.

Body Parameters

Updates to apply to Email settings.

EmailPreferenceUpdateByContactRequest
NameDescriptionTypeAdditional information
EmailPreferencesByContact

Collection of EmailPreferenceByContact

None.

Request Formats

application/json, text/json

Sample:
{
  "EmailPreferencesByContact": [
    {
      "LegacyContactKey": "sample string 1",
      "ContactKey": "d1cbe475-6512-4636-adb6-3c5104a2c364",
      "MessageClass": 0,
      "OptOut": true
    },
    {
      "LegacyContactKey": "sample string 1",
      "ContactKey": "d1cbe475-6512-4636-adb6-3c5104a2c364",
      "MessageClass": 0,
      "OptOut": true
    }
  ]
}

application/xml, text/xml

Sample:
<EmailPreferenceUpdateByContactRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request">
  <EmailPreferencesByContact>
    <EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
      <ContactKey>d1cbe475-6512-4636-adb6-3c5104a2c364</ContactKey>
      <LegacyContactKey>sample string 1</LegacyContactKey>
      <MessageClass>All</MessageClass>
      <OptOut>true</OptOut>
    </EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
    <EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
      <ContactKey>d1cbe475-6512-4636-adb6-3c5104a2c364</ContactKey>
      <LegacyContactKey>sample string 1</LegacyContactKey>
      <MessageClass>All</MessageClass>
      <OptOut>true</OptOut>
    </EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
  </EmailPreferencesByContact>
</EmailPreferenceUpdateByContactRequest>

Response Information

Resource Description

A list of updated EmailPreference objects corresponding to the updates passed in.

EmailPreferenceUpdateByContactResponse
NameDescriptionTypeAdditional information
SuccessList

List of Email Preference Updates that succeeded.

Collection of EmailPreferenceByContact

None.

FailureList

List of Email Preference Updates that failed.

Collection of EmailPreferenceByContactUpdateFailure

None.

Response Formats

application/json, text/json

Sample:
{
  "SuccessList": [
    {
      "LegacyContactKey": "sample string 1",
      "ContactKey": "66fa10db-5ed5-4223-9906-d578051f8a6e",
      "MessageClass": 0,
      "OptOut": true
    },
    {
      "LegacyContactKey": "sample string 1",
      "ContactKey": "66fa10db-5ed5-4223-9906-d578051f8a6e",
      "MessageClass": 0,
      "OptOut": true
    }
  ],
  "FailureList": [
    {
      "RequestData": {
        "LegacyContactKey": "sample string 1",
        "ContactKey": "66fa10db-5ed5-4223-9906-d578051f8a6e",
        "MessageClass": 0,
        "OptOut": true
      },
      "ErrorMessage": "sample string 1"
    },
    {
      "RequestData": {
        "LegacyContactKey": "sample string 1",
        "ContactKey": "66fa10db-5ed5-4223-9906-d578051f8a6e",
        "MessageClass": 0,
        "OptOut": true
      },
      "ErrorMessage": "sample string 1"
    }
  ]
}

application/xml, text/xml

Sample:
<EmailPreferenceUpdateByContactResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise">
  <FailureList>
    <EmailPreferenceUpdateByContactResponse.EmailPreferenceByContactUpdateFailure>
      <ErrorMessage>sample string 1</ErrorMessage>
      <RequestData xmlns:d4p1="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request">
        <d4p1:ContactKey>66fa10db-5ed5-4223-9906-d578051f8a6e</d4p1:ContactKey>
        <d4p1:LegacyContactKey>sample string 1</d4p1:LegacyContactKey>
        <d4p1:MessageClass>All</d4p1:MessageClass>
        <d4p1:OptOut>true</d4p1:OptOut>
      </RequestData>
    </EmailPreferenceUpdateByContactResponse.EmailPreferenceByContactUpdateFailure>
    <EmailPreferenceUpdateByContactResponse.EmailPreferenceByContactUpdateFailure>
      <ErrorMessage>sample string 1</ErrorMessage>
      <RequestData xmlns:d4p1="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request">
        <d4p1:ContactKey>66fa10db-5ed5-4223-9906-d578051f8a6e</d4p1:ContactKey>
        <d4p1:LegacyContactKey>sample string 1</d4p1:LegacyContactKey>
        <d4p1:MessageClass>All</d4p1:MessageClass>
        <d4p1:OptOut>true</d4p1:OptOut>
      </RequestData>
    </EmailPreferenceUpdateByContactResponse.EmailPreferenceByContactUpdateFailure>
  </FailureList>
  <SuccessList xmlns:d2p1="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request">
    <d2p1:EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
      <d2p1:ContactKey>66fa10db-5ed5-4223-9906-d578051f8a6e</d2p1:ContactKey>
      <d2p1:LegacyContactKey>sample string 1</d2p1:LegacyContactKey>
      <d2p1:MessageClass>All</d2p1:MessageClass>
      <d2p1:OptOut>true</d2p1:OptOut>
    </d2p1:EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
    <d2p1:EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
      <d2p1:ContactKey>66fa10db-5ed5-4223-9906-d578051f8a6e</d2p1:ContactKey>
      <d2p1:LegacyContactKey>sample string 1</d2p1:LegacyContactKey>
      <d2p1:MessageClass>All</d2p1:MessageClass>
      <d2p1:OptOut>true</d2p1:OptOut>
    </d2p1:EmailPreferenceUpdateByContactRequest.EmailPreferenceByContact>
  </SuccessList>
</EmailPreferenceUpdateByContactResponse>