UnsubscribeContact

Unsubscribes contact from account

This method unsubscribes a contact from your account.

SOAP action: http://apiconnector.com/v2/ApiService/UnsubscribeContact

πŸ“˜

Input and output parameters

Input parameters

  • Email - required; string

Output parameters

  • UnsubscribeContactResult
    • SuppressedContact
      • Id - integer
      • Email - string
      • OptInType - string ('Unknown', 'Single', 'Double', 'VerifiedDouble')
      • EmailType - string ('PlainText', 'Html')
      • DataFields - optional; array of ContactData
        • ContactData
          • Key - string
          • Value - anyType
        • Status - string ('Subscribed', 'Unsubscribed', 'SoftBounced', 'HardBounced', 'IspComplained', 'MailBlocked', 'PendingOptIn', 'DirectComplaint', 'Deleted', 'SharedSuppression', 'Suppressed', 'NotAllowed', 'DomainSuppression', 'NoMxRecord')
    • DateRemoved - dateTime
    • Reason - *string ('Subscribed', 'Unsubscribed', 'SoftBounced', 'HardBounced', 'IspComplained', 'MailBlocked', 'PendingOptIn', 'DirectComplaint', 'Deleted', 'SharedSuppression', 'Suppressed', 'NotAllowed', 'DomainSuppression', 'NoMxRecord')

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var contactEmail = "[email protected]";
	var contact = client.GetContactByEmail(contactEmail);
	var suppression = client.UnsubscribeContact(contact);
}