自定义拦截
最新更新:2023-08-10
如果您遇到了恶意注册,某些地址或邮箱后续不想再发信,可将域名或具体邮箱地址添加到自定义拦截中。
在此列表中的邮件地址, 会被系统拦截。
你可以对此列表进行查询,添加、删除操作。
查询
URL
https://email.api.engagelab.cc/v1/blocks
https://email.api.engagelab.cc/v1/blocks
此代码块在浮窗中显示
HTTP 请求方法
GET
GET
此代码块在浮窗中显示
Header
Header | 类型 | 必需 | 描述 |
---|---|---|---|
Authorization | string | 是 | Basic base64(api_user:api_key) |
查询参数描述
参数 | 类型 | 是否必需 | 描述 |
---|---|---|---|
start_date | string | * | 开始日期,格式为 yyyy-MM-dd |
end_date | string | * | 结束日期,格式为 yyyy-MM-dd |
email_or_domain | string | * | 电子邮件或域名(例如,11@gmail.com ,hotmail.com ) |
api_user | string | 否 | 拦截关联的API_USER,默认为 all |
offset | int | 否 | 开始 [0-100],默认为 100 |
limit | int | 否 | 数量 [0-100],默认为 100 |
提示:
- 查询的天数不超过三个月.
请求示例:
curl -X GET -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
'https://email.api.engagelab.cc/v1/blocks?offset=0&limit=1'
curl -X GET -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
'https://email.api.engagelab.cc/v1/blocks?offset=0&limit=1'
此代码块在浮窗中显示
返回值描述
参数 | 描述 |
---|---|
api_user | 拦截关联的API_USER |
email_or_domain | 拦截关联的电子邮件或域名 |
create_time | 创建时间 |
expire_time | 过期时间 |
返回值示例
{
"result": [
{
"block_id": 122,
"api_user": "all",
"email_or_domain": "11@gmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"block_id": 123,
"api_user": "all",
"email_or_domain": "hotmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"block_id": 124,
"api_user": "all",
"email_or_domain": "22@yahoo.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
}
],
"count": 3,
"total": 10
}
{
"result": [
{
"block_id": 122,
"api_user": "all",
"email_or_domain": "11@gmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"block_id": 123,
"api_user": "all",
"email_or_domain": "hotmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"block_id": 124,
"api_user": "all",
"email_or_domain": "22@yahoo.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
}
],
"count": 3,
"total": 10
}
此代码块在浮窗中显示
添加
URL
https://email.api.engagelab.cc/v1/blocks
https://email.api.engagelab.cc/v1/blocks
此代码块在浮窗中显示
HTTP 请求方法
POST
POST
此代码块在浮窗中显示
Header
Header | 类型 | 必需 | 描述 |
---|---|---|---|
Authorization | string | 是 | Basic base64(api_user:api_key) |
Body 参数描述
参数 | 类型 | 是否必需 | 描述 |
---|---|---|---|
api_user | string | 否 | 拦截关联的 API_USER,默认为 all |
email_or_domain | array | 是 | 电子邮件或域名的数组(例如,["11@gmail.com","hotmail.com","22@yahoo.com"] ) |
expire_time | string | 是 | 过期时间,格式为 yyyy-MM-dd |
请求示例:
curl -X POST -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
--data '{"api_user": "123456abc","email_or_domain": ["11@gmail.com","hotmail.com","22@yahoo.com"],"expire_time":"2023-12-31"}'
'https://email.api.engagelab.cc/v1/blocks'
curl -X POST -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
--data '{"api_user": "123456abc","email_or_domain": ["11@gmail.com","hotmail.com","22@yahoo.com"],"expire_time":"2023-12-31"}'
'https://email.api.engagelab.cc/v1/blocks'
此代码块在浮窗中显示
返回值描述
参数 | 描述 |
---|---|
api_user | 拦截关联的 API_USER |
email_or_domain | 电子邮件或域名 |
create_time | 创建时间 |
expire_time | 过期时间 |
返回值示例
{
"result": [
{
"api_user": "all",
"email_or_domain": "11@gmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"api_user": "all",
"email_or_domain": "hotmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"api_user": "all",
"email_or_domain": "22@yahoo.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
}
]
}
{
"result": [
{
"api_user": "all",
"email_or_domain": "11@gmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"api_user": "all",
"email_or_domain": "hotmail.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
},{
"api_user": "all",
"email_or_domain": "22@yahoo.com",
"create_time": "2021-03-01 17:24:34",
"expire_time": "2021-10-01 00:00:00"
}
]
}
此代码块在浮窗中显示
删除
URL
https://email.api.engagelab.cc/v1/blocks
https://email.api.engagelab.cc/v1/blocks
此代码块在浮窗中显示
HTTP 请求方式
DELETE
DELETE
此代码块在浮窗中显示
Header
Header | 类型 | 必需 | 描述 |
---|---|---|---|
Authorization | string | 是 | Basic base64(api_user:api_key) |
Body 参数描述
参数 | 类型 | 是否必需 | 描述 |
---|---|---|---|
api_user | string | 否 | 拦截关联的 API_USER |
email_or_domain | array | 是 | 拦截关联的域名或邮件地址 |
请求示例:
curl -X DELETE -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
--data '{"api_user":"123456abc","email_or_domain":["xjmfc@example.com","gmail.com"]}'
'https://email.api.engagelab.cc/v1/blocks'
curl -X DELETE -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
--data '{"api_user":"123456abc","email_or_domain":["xjmfc@example.com","gmail.com"]}'
'https://email.api.engagelab.cc/v1/blocks'
此代码块在浮窗中显示
返回值说明
参数 | 描述 |
---|---|
count | 成功删除的个数 |
返回值示例
{
"count": 1
}
{
"count": 1
}
此代码块在浮窗中显示