API Documentation V2
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:
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
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, MD5 or SHA256.</Message>
</ErrorMessage>
</ApiResponse>