# Block
If you encounter malicious registration and do not want to send emails to some addresses or mailboxes , you can add the domain or specific email address to the block .
Email addresses in this list will be blocked by the system.
You can query, add and delete this list.
# Query
URL
https://api2.sendcloud.net/api/block/list
1
HTTP Request Method
post get
1
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) |
startDate | string | * | start date, formatted with yyyy-MM-dd |
endDate | string | * | end date, formatted with yyyy-MM-dd |
apiUserBlock | string | no | block API_USER |
domainName | string | no | block receiving domain |
string | no | block email address | |
start | int | no | amount, [0-100], defaults to 100 |
limit | int | no | amount, [0-100], defaults to 100 |
Tips:
- With designated time span, you are to search within the period of time. Note: start_date and end_date, or [days] is required.
- Time frame cannot be longer than 3 months.
Request Example:
https://api2.sendcloud.net/api/block/list?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***&days=100&start=0&limit=3
1
Returned Value Description
parameter | description |
---|---|
apiUserBlock | block API_USER |
block email address | |
domain | block receiving domain |
createTime | create time |
expireTime | expire time |
Returned Value Example
{
"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
# Add
URL
https://api2.sendcloud.net/api/block/add
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
apiUserBlock | string | no | block API_USER |
domainName | string | * | block receiving domain |
string | * | block email address | |
expireTime | string | yes | expire time, formatted with yyyy-MM-dd |
Tips:
- If apiUserBlock is empty, it defaults to apiUser of all type
- domainName and email cannot be empty at the same time
- Take apiUserBlock and domainName or apiUserBlock and email as the judgment conditions. If there is duplicate data, it will not be added repeatedly
- If domainName and email are filled in at the same time, they will be automatically split into two records (apiUserBlock and domainName , domainName and email)
Request Example:
https://api2.sendcloud.net/api/block/add?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***
1
Returned Value Description
parameter | description |
---|---|
apiUserBlock | block API_USER |
block email address | |
domain | block receiving domain |
createTime | create time |
expireTime | expire time |
Returned Value Example
{
"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
# Delete
URL
https://api2.sendcloud.net/api/block/delete
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
apiUserBlock | string | no | block API_USER |
domainName | string | * | block receiving domain,e.g. domainNamek=qq.com |
string | * | block email address |
Tips:
- If apiUserBlock is empty, it defaults to apiUser of all type
- domainName and email cannot be empty at the same time
- 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://api2.sendcloud.net/api/block/delete?apiUser=***&apiKey=***&apiUserBlock=***&domainName=***&email=***
1
Returned Value Description
parameter | description |
---|---|
count | number of successfully deleted |
Returned Value Example
{
"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