POST api/v2.0/Contacts/UpdateMyEmailPreferences
Change Global Email preferences for the Currently Authenticated User.
Request Information
URI Parameters
None.
Body Parameters
Updates to apply to Email settings.
EmailPreferenceUpdateRequestName | Description | Type | Additional information |
---|---|---|---|
EmailPreferences |
List of Email Preference Updates |
Collection of EmailPreference |
None. |
Request Formats
application/json, text/json
Sample:
{ "EmailPreferences": [ { "MessageClass": 0, "OptOut": true }, { "MessageClass": 0, "OptOut": true } ] }
application/xml, text/xml
Sample:
<EmailPreferenceUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request"> <EmailPreferences> <EmailPreferenceUpdateRequest.EmailPreference> <MessageClass>All</MessageClass> <OptOut>true</OptOut> </EmailPreferenceUpdateRequest.EmailPreference> <EmailPreferenceUpdateRequest.EmailPreference> <MessageClass>All</MessageClass> <OptOut>true</OptOut> </EmailPreferenceUpdateRequest.EmailPreference> </EmailPreferences> </EmailPreferenceUpdateRequest>
Response Information
Resource Description
A list of the successfully updated Email Preferences.
EmailPreferenceUpdateResponseName | Description | Type | Additional information |
---|---|---|---|
SuccessList |
List of Email Preference Updates that succeeded. |
Collection of EmailPreference |
None. |
FailureList |
List of details about each Email Preference Update Request that failed. |
Collection of EmailPreferenceUpdateFailure |
None. |
Response Formats
application/json, text/json
Sample:
{ "SuccessList": [ { "MessageClass": 0, "OptOut": true }, { "MessageClass": 0, "OptOut": true } ], "FailureList": [ { "MessageClass": 0, "ErrorMessage": "sample string 1", "OptOut": true }, { "MessageClass": 0, "ErrorMessage": "sample string 1", "OptOut": true } ] }
application/xml, text/xml
Sample:
<EmailPreferenceUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise"> <FailureList> <EmailPreferenceUpdateResponse.EmailPreferenceUpdateFailure> <ErrorMessage>sample string 1</ErrorMessage> <MessageClass>All</MessageClass> <OptOut>true</OptOut> </EmailPreferenceUpdateResponse.EmailPreferenceUpdateFailure> <EmailPreferenceUpdateResponse.EmailPreferenceUpdateFailure> <ErrorMessage>sample string 1</ErrorMessage> <MessageClass>All</MessageClass> <OptOut>true</OptOut> </EmailPreferenceUpdateResponse.EmailPreferenceUpdateFailure> </FailureList> <SuccessList xmlns:d2p1="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request"> <d2p1:EmailPreferenceUpdateRequest.EmailPreference> <d2p1:MessageClass>All</d2p1:MessageClass> <d2p1:OptOut>true</d2p1:OptOut> </d2p1:EmailPreferenceUpdateRequest.EmailPreference> <d2p1:EmailPreferenceUpdateRequest.EmailPreference> <d2p1:MessageClass>All</d2p1:MessageClass> <d2p1:OptOut>true</d2p1:OptOut> </d2p1:EmailPreferenceUpdateRequest.EmailPreference> </SuccessList> </EmailPreferenceUpdateResponse>