此接口用于将单个收件人添加至本地黑名单列表中。OK应答内容为“201 – Created”。
元素/属性 | 类型 | 描述 |
---|---|---|
apiKey | string | 你的API key,用于验证身份,必填项。 |
entry | string | 添加至本地黑名单列表中的有效条目包含以下几种,必填项。
|
entryType | string | 添加至本地黑名单的条目类型。将根据实际录入的条目类型判定其是否有效,有效类型:
选填,默认值为“邮箱地址” |
此接口将自动过滤掉已存在于本地黑名单中的重复条目。
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 |
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
ser-Agent: Jakarta Commons-HttpClient/3.1
Host: localapi
Content-Length: 0
|
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 |
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 XX-AspNet-Version: 2.0.50727 Set-Cookie: TIMEZONE=Central European Standard Time; path=/ CX-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<ode> <Message>Entry is not a valid SHA256.</Message> </ErrorMessage> </ApiResponse> |