# 自定义拦截
如果您遇到了恶意注册,某些地址或邮箱后续不想再发信,可将域名或具体邮箱地址添加到自定义拦截中.
在此列表中的邮件地址, 会被系统拦截。
你可以对此列表进行查询,添加、删除操作
# 查询
URL
https://api2.sendcloud.net/api/block/list
1
HTTP请求方式
post get
1
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
days | int | * | 过去 days 天内的统计数据 (days=1 表示今天) |
startDate | string | * | 开始日期, 格式为yyyy-MM-dd |
endDate | string | * | 结束日期, 格式为yyyy-MM-dd |
apiUserBlock | string | 否 | 拦截关联的apiUser |
domainName | string | 否 | 拦截接收域域名 |
string | 否 | 拦截email地址 | |
start | int | 否 | 查询起始位置, 取值区间 [0-], 默认为 0 |
limit | int | 否 | 查询个数, 取值区间 [0-100], 默认为 100 |
提示:
- 如果指定时间区间, 则是查询此时间区间内的自定义拦截列表. 注意: startDate 与 endDate 的组合 或者 days 参数, 二者取一.
- 查询的天数不超过三个月.
请求示例:
https://api2.sendcloud.net/api/block/list?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***&days=100&start=0&limit=3
1
返回值说明
参数 | 说明 |
---|---|
apiUserBlock | 拦截关联的apiUser |
邮件地址 | |
domain | 接收域域名 |
createTime | 创建时间 |
expireTime | 过期时间 |
返回值示例
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
"dataList": [
{
"apiUserBlock": "all",
"domain": "",
"email": "0.0.vallin@gmail.com",
"createTime": "2021-03-01 17:24:34",
"expireTime": "2021-10-01 00:00:00"
},
{
"apiUserBlock": "all",
"domain": "",
"email": "001112@icloud.com",
"createTime": "2021-03-01 17:24:34",
"expireTime": "2021-10-01 00:00:00"
}
],
"count": 2
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 添加
URL
https://api2.sendcloud.net/api/block/add
1
HTTP请求方式
post get
1
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
apiUserBlock | string | 否 | 拦截关联的apiUser |
domainName | string | * | 拦截接收域域名 |
string | * | 拦截email地址 | |
expireTime | string | 是 | 过期时间, 格式为yyyy-MM-dd |
提示:
- apiUserBlock 若为空 ,默认为 all 类型的apiUser
- domainName 和 email 不可同时为空
- 以apiUserBlock 与domainName 或 apiUserBlock与email 为判断条件,若有重复数据则不会重复添加
- domainName 和email 同时填写,则会自动拆分为两条记录(apiUserBlock与domainName 、apiUserBlock与email)
请求示例
https://api2.sendcloud.net/api/block/add?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***
1
返回值说明
参数 | 说明 |
---|---|
apiUserBlock | 拦截关联的apiUser |
邮件地址 | |
domain | 接收域域名 |
createTime | 创建时间 |
expireTime | 过期时间 |
返回值示例
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
"dataList": [
{
"apiUserBlock": "all",
"domain": "",
"email": "leon@gmail.com",
"createTime": "2021-07-19 11:30:00",
"expireTime": "2021-10-10 00:00:00"
},
{
"apiUserBlock": "all",
"domain": "yahoo.com",
"email": "",
"createTime": "2021-07-19 11:25:29",
"expireTime": "2021-10-10 00:00:00"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 删除
URL
https://api2.sendcloud.net/api/block/delete
1
HTTP请求方式
post get
1
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
apiUserBlock | string | 否 | 拦截关联的apiUser |
domainName | string | * | 拦截接收域域名,如 domainNamek=qq.com |
string | * | 拦截email地址 |
提示:
- apiUserBlock 若为空 ,默认为 all 类型的apUser
- domainName 和 email 不可同时为空
- domainName 和email 同时填写,则分别删除 apiUserBlock 和domainName 与 apiUserBlock 和email 查询到的记录
请求示例
https://api2.sendcloud.net/api/block/delete?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***
1
返回值说明
参数 | 说明 |
---|---|
count | 成功删除的个数 |
返回值示例
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
"count": 2
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8