Custom Interception

If you encounter malicious registration, some addresses or mailboxes do not want to send any further letters, you can add the domain name or specific address to the custom intercept.

The email addresses in this list will be blocked by the system, and the failures will be classified as 无效邮件-在SendCloud黑名单中:自定义拦截(worker:address in block list)

You can query, add and delete this list.


QUERY

URL

https://api.sendcloud.net/apiv2/block/list

HTTP Request Method

post    get

Parameter Description

Parameter type required or not description
apiUser string yes API_USER
apiKey string yes API_KEY
days int * stats in the past [days] days ( [days] =1 means today); cannot be more than 30 days
startDate string * format of start date is yyyy-MM-dd,interval between start and end date cannot be more than 30 days
endDate string * format of end date is yyyy-MM-dd,interval between start and end date cannot be more than 30 days
apiUserBlock string no Intercept associated apiuser
domainName string no Block domain name
email string no Intercept email address
start int no start position, [0-], defaults to 0
limit int no amount, [0-100],defaults to 100

Tips:

  1. If a time interval is specified, the user-defined interception list within this time interval will be queried. Note: the combination of StartDate and enddate or the days parameter, one of the two
  2. The number of days for query shall not exceed three months

Request Example:

https://api.sendcloud.net/apiv2/block/list?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***&days=100&start=0&limit=3

Returned Value Description

Parameter description
apiUserBlock Intercept associated apiuser
email email address
domain Recipient domain
createTime Creation time
expireTime When the sendcloud blacklist expires

Return value example

{
    "result": true,
    "statusCode": 200,
    "message": "请求成功",
    "info": {
        "dataList": [
            {
                "apiUserBlock": "all",
                "domain": "",
                "email": "0.0.vallin@gmail.com",
                "createTime": "2021-03-01 17:24:34",
                "expireTime": "2031-03-01 00:00:00"
            },
            {
                "apiUserBlock": "all",
                "domain": "",
                "email": "001112@icloud.com",
                "createTime": "2021-03-01 17:24:34",
                "expireTime": "2031-03-01 00:00:00"
            }
        ],
        "count": 2
    }
}

Add

URL

https://api.sendcloud.net/apiv2/block/add

HTTP Request Method

post    get

Parameter Description

Parameter type required or not description
apiUser string yes API_USER
apiKey string yes API_KEY
apiUserBlock string no Intercept associated apiuser
domainName string * Block domain name
email string * Intercept email address
expireTime string yes When the sendcloud blacklist expires, Format is yyyy MM DD

Tips:

  1. If apiuserblock is empty, it defaults to apuser of all type
  2. domainName and email cannot be empty at the same time
  3. Based on apiuserBlock and domainName or apiuserBlock and email, if there is duplicate data, it will not be added repeatedly
  4. If domainName and email are filled in at the same time, they will be automatically split into two records (apiuserBlock and domainName, apiuserBlock and email)

Request Example

https://api.sendcloud.net/apiv2/block/add?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***

Returned Value Description

Parameter description
apiUserBlock Intercept associated apiuser
email email address
domain Recipient domain
createTime Creation time
expireTime When the sendcloud blacklist expires

Return value example

{

    "result": true, 
    "statusCode": 200,
    "message": "请求成功", 
    "info": {
        "dataList": [
            {
                "apiUserBlock": "all",
                "domain": "",
                "email": "leon@gmail.com",
                "createTime": "2021-07-19 11:30:00",
                "expireTime": "2023-10-10 00:00:00"
            },
            {
                "apiUserBlock": "all",
                "domain": "yahoo.com",
                "email": "",
                "createTime": "2021-07-19 11:25:29",
                "expireTime": "2023-10-10 00:00:00"
            }
        ] 
    } 
}

Delete

URL

https://api.sendcloud.net/apiv2/block/delete

HTTP Request Method

post    get

Returned Value Description

Parameter type required or not description
apiUser string yes API_USER
apiKey string yes API_KEY
apiUserBlock string no Intercept associated apiuser
domainName string * Block recipient domain name,eg: domainNamek=qq.com
email string * Intercept email address

Tips:

  1. If apiuserBlock is empty, it defaults to apuser of all type
  2. domainName and email cannot be empty at the same time
  3. If domainName and email are filled in at the same time, the records queried by apiuserBlock and domainName, apiuserBlock and email will be deleted respectively

Request Example

https://api.sendcloud.net/apiv2/block/delete?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***

Returned Value Description

参数 说明
count 成功删除的个数

Return value example

{
    "result": true,
    "statusCode": 200,
    "message": "请求成功",
    "info": {
        "count": 2
    }
}