API

Add contact to the suppression list

This example shows how to add a contact to the 'rejected email list', also known as the suppression list. The suppression list contains contacts who must never receive mailings, regardless of their status in the mailing lists.

Parameters

Parameters
FieldTypeDescriptionRequired / Optional
usernamestring

The username used to log in to MailCamp.

Required
usertokenstring

The unique token assigned to the user named above.

Required
requesttypestring

The name of the relevant API file.

Required
requestmethodstring

The name of the function being called.

Required
responsetypestring

The format of the response. This can be 'xml' or 'json'.

Optional
details

See the fields below.

Required
emailaddressstring

The email address of the contact you want to add to the rejected email list/suppression list

Required
listidint

The ID of the mailing list. If you do not specify it, it applies to all mailing lists.

Required

Successful response

Successful response
FieldTypeDescription
statusstring

The value of the status field is returned as “SUCCESS” on a successful response.

Error response

Error response
FieldTypeDescription
statusstring

The value of the status field will be “FAILED”.

errormessagestring

A text message explaining why the request failed.

Request example
<xmlrequest>
	<username>admin</username>
	<usertoken>0123456789abcdef0123456789abcdef01234567</usertoken>
	<requesttype>subscribers</requesttype>
	<requestmethod>AddBannedSubscriber</requestmethod>
	<responsetype>xml</responsetype>
	<details>
		<emailaddress>email@mailcamp.nl</emailaddress>
		<listid>99</listid>
	</details>
</xmlrequest>