Skip to content

Add to suppression list

Used to add a single entry to a suppression list specified by ID parameter. Successful request returns “201 – Created” HTTP code and empty response body.

Request URL parameters:

Element/attributeTypeNotes
apiKeystringYour API key, required for authentication. Required.
IDintSuppression list ID. Required as a part of address (not GET parameter). See example below.
entrystringEntry to add to specified suppression list. A valid entry can be:
email, e.g. username@domain.comdomain, e.g. domain.comMD5, e.g. 2c2ba4dc950fd1162c47b08fdcfabe24 phone,e.g. 48501202365dialing prefix, e.g. 48Required.
entryType stringSpecifies whether the entry to be added to a Phone-type suppression list is a phone number of dialing prefix (this parameter will be ignored when provided for Email-type suppression list). Valid values:
phoneprefixOptional. Defaults to phone.  

This method will ignore duplicated values on suppression list. You will not receive an error when trying to add an email address (or domain, MD5, phone, prefix) that is already present on suppression list.

You will receive an error when sending an invalid or empty entry, though.

Example URLs:

https://api.esv2.com/v2/Api/SuppressionLists/123?apiKey=YOUR_API_KEY_HERE&entry=username%40domain.com 

https://api.esv2.com/v2/Api/SuppressionLists/123?apiKey=YOUR_API_KEY_HERE&entry=2c2ba4dc950fd1162c47b08fdcfabe24

https://api.esv2.com/v2/Api/SuppressionLists/456?apiKey=YOUR_API_KEY_HERE&entryType=prefix&entry=48

Examples

Request:

POST https://api.esv2.com/v2/Api/SuppressionLists/123?apiKey=test_api_key1&entry=username40domain.com HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: application/x-www-form-urlencoded 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: localapi 
Content-Length: 0

OK response:

HTTP/1.1 201 Created 
Cache-Control: private 
Server: Microsoft-IIS/7.5 
X-AspNetMvc-Version: 2.0 
X-AspNet-Version: 2.0.50727 
Set-Cookie: TIMEZONE=Central European Standard Time; path=/ 
X-Powered-By: ASP.NET 
Date: Wed, 19 Oct 2011 12:10:34 GMT 
Content-Length: 0

Error response:

HTTP/1.1 400 Bad Request 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Server: Microsoft-IIS/7.5 
X-AspNetMvc-Version: 2.0 
X-AspNet-Version: 2.0.50727 
Set-Cookie: TIMEZONE=Central European Standard Time; path=/ 
X-Powered-By: ASP.NET 
Date: Wed, 19 Oct 2011 12:12:36 GMT 
Content-Length: 271 

<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <ErrorMessage>
     <Code>400</Code>
     <Message>Entry is not a valid email, domain or MD5.</Message>
   </ErrorMessage>
</ApiResponse>
On this page
To top