Перейти к содержимому

Add to local blacklist

Used to add a single entry to a local blacklist . Successful request returns “201 – Created” HTTP code and empty response body.

Request URL parameters: 

Element/attributeTypeNotes
apiKeystringYour API key, required for authentication. Required.
entrystringEntry to add to local black list. A valid entry can be:
email, e.g. username@domain.com
domain, e.g. domain.com
MD5, e.g. 2c2ba4dc950fd1162c47b08fdcfabe24 
sha256, e.g. CECD4BD504D40A832E106CFF3356D8C401D569CF771433E3F1ACE4FA31666550 
phone,e.g. 48501202365
dialing prefix, e.g. 48Required.
entryType stringType of added record to local blacklist. Entry will be validated according to specified type. Valid values:
domain
md5
sha256
phone
prefix
Optional. Defaults to «email».  

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

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

Example URLs:

https://api.esv2.com /v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=lbl_test@domain.com 

https://api.esv2.com/v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=lbltest.com&entryType=domain 

https://api.esv2.com/v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=25522A4A65882F8FD23A4C56F7C92A31&entryType=md5 

https://api.esv2.com/v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=CECD4BD504D40A832E106CFF3356D8C401D569CF771433E3F1ACE4FA31666550&entryType=sha256 

https://api.esv2.com/v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=+48880123456&entryType=phone 

https://api.esv2.com/v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=48&entryType=prefix 

Examples

Request: 

POST https://api.esv2.com /v2/Api/LocalBlacklist?apiKey=test_api_key1&entry=lbl_test@domain.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 SHA256.</Message>
   </ErrorMessage>
</ApiResponse>