Blocks API
If you encounter malicious registration and do not want to send emails to certain addresses or mailboxes, you can add the domain or specific email address to the block list. Email addresses in this list will be blocked by the system. You can query, add, and delete entries in this list.
Call Address
| Data Center | URL |
|---|---|
| Singapore | https://email.api.engagelab.cc |
| Turkey | https://emailapi-tr.engagelab.com |
When using the REST API, ensure that the selected data center corresponds to the appropriate base URL.
POST/v1/blocks
Query
URL
https://email.api.engagelab.cc/v1/blocks
HTTP Request Method
GET
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | String | true | Basic base64(api_user:api_key) |
Query Parameter Description
| Parameter | Type | Required or not | Description |
|---|---|---|---|
| start_date | string | * | Start date, formatted with yyyy-MM-dd |
| end_date | string | * | End date, formatted with yyyy-MM-dd |
| email_or_domain | string | * | Emails or domains (e.g., 11@gmail.com, hotmail.com) |
| api_user | string | no | Block API_USER, defaults to all |
| offset | int | no | Start [0-100], defaults to 100 |
| limit | int | no | Amount [0-100], defaults to 100 |
Tips:
- The time frame cannot be longer than 3 months.
Request Example:
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'
Returned Value Description
| Parameter | Description |
|---|---|
| api_user | Block API_USER |
| email_or_domain | Blocked email or domain |
| create_time | Creation time |
| expire_time | Expiration time |
Returned Value Example
{
"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
}
Add
URL
https://email.api.engagelab.cc/v1/blocks
HTTP Request Method
POST
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | String | true | Basic base64(api_user:api_key) |
Body Parameter Description
| Parameter | Type | Required or not | Description |
|---|---|---|---|
| api_user | string | no | Block API_USER, defaults to all |
| email_or_domain | array | yes | Emails or domains (e.g., ["11@gmail.com","hotmail.com","22@yahoo.com"]) |
| expire_time | string | yes | Expiration time, formatted with yyyy-MM-dd |
Request Example:
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'
Returned Value Description
| Parameter | Description |
|---|---|
| api_user | Block API_USER |
| email_or_domain | Email or domain |
| create_time | Creation time |
| expire_time | Expiration time |
Returned Value Example
{
"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"
}
]
}
Delete blocks
URL
https://email.api.engagelab.cc/v1/blocks
HTTP Request Method
DELETE
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | String | true | Basic base64(api_user:api_key) |
Body Parameter Description
| Parameter | Type | Required or not | Description |
|---|---|---|---|
| api_user | string | no | Block API_USER |
| email_or_domain | array | yes | Blocked receiving domains or email addresses |
Request Example:
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'
Returned Value Description
| Parameter | Description |
|---|---|
| count | Number of successfully deleted items |
Returned Value Example
{
"count": 1
}








