Domain
User must configure the mail domain to send emails by EngageLab.
You can query, add or modify the domain.
Query (Batch)
Query domain through this interface.
URL
https://email.api.engagelab.cc/v1/domains
HTTP Request Method
GET
Request Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | String | true | Basic base64(apiUser:apiKey) |
Query Parameter Description
Parameter | Type | Required or not | Description |
---|---|---|---|
names | string | no | domain name. Use ; separate |
type | int | no | domain type: 0 (testing domain), 1(common domain) |
Request Example
curl "https://email.api.engagelab.cc/v1/domains?name=engagelab.com;xjm.cc" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
Returned value description
Parameter | Description |
---|---|
domain_id | domain ID |
name | domain name |
type | domain type |
verify | verification value |
spf | configuration of SPF |
domain | host record of SPF |
value | configuration value of SPF |
verify | whether the configuration is successful (true or false) |
dkim | configuration of DKIM |
domain | host record of DKIM |
value | configuration value of DKIM |
verify | whether the configuration is successful (true or false) |
mx | configuration of MX |
domain | host record of MX |
value | configuration value of MX |
verify | whether the configuration is successful (true or false) |
dmarc | host record of Dmarc |
domain | host record of Dmarc |
value | configuration value of Dmarc |
verify | whether the configuration is successful (true or false) |
create_time | time of domain creation |
update_time | time of domain modification |
Returned Value Example
Response-success
HTTP Status: 200
{
"result": [
{
"domain_id": 147799,
"name": "22edc.com",
"type": 1,
"spf": {
"domain": "22edc.com",
"value": "v=spf1 include:spf.email.engagelab.com -all",
"verify": false
},
"dkim": {
"domain": "mail._domainkey.22edc.com",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmiE1poIZgcYRhTCtmgC20ASZVABbMxZWHuPG1W4JBmmkaTOjjzCUSjpBvWxgHOtzPQcQ9F8PY9iL9b3WGajwtEaEiJjk6z6ezeZzDOyYUnk79B6lrcGmNOVKaJOyh5qSOr3N0t36BbO9g37+PqYhisZH3kORLCqMrTcHuUFsJ7QIDAQAB",
"verify": false
},
"mx": {
"domain": "22edc.com",
"value": "mx1.engagelab.com",
"verify": false
},
"dmarc": {
"domain": "_dmarc.22edc.com",
"value": "v=DMARC1;p=reject;ruf=mailto:dmarc@22edc.com;rua=mailto:dmarc_report@22edc.com",
"verify": false
},
"create_time": "2022-11-12T15:38:14+0800",
"update_time": "2022-12-15T10:52:05+0800"
}
],
"count": 1
}
Response-error
HTTP Status :401
{
"code": 30000,
"message": "Authentication failed."
}
Add
Add domains through this interface
URL
https://email.api.engagelab.cc/v1/domains
Content-Type:
application/json; charset=utf-8
HTTP Request Method
POST
Request Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | String | true | Basic base64(apiUser:apiKey) |
Query Parameter Description
Parameter | Type | Required or not | Description |
---|---|---|---|
name | string | yes | domain name. It must conform to the domain name format and can only contain [0-9a-zA-Z -.], 4~255 characters, such as mail.test.best. |
Tips:
1.Each user can add up to 5 domains
Request Example
curl -X POST "https://email.api.engagelab.cc/v1/domains"
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
--header "Content-Type: application/json"
--data '{
"name":"m1314520.com",
}'
Returned value description
Return to eligible domain information.
Parameter | Description |
---|---|
domain_id | domain Id |
name | domain name |
type | domain type |
spf | configuration of SPF |
domain | host record of SPF |
value | configuration value of SPF |
verify | whether the configuration is successful (true or false) |
dkim | configuration of DKIM |
domain | host record of DKIM |
value | configuration value of DKIM |
verify | whether the configuration is successful (true or false) |
mx | configuration of MX |
domain | host record of MX |
value | configuration value of MX |
verify | whether the configuration is successful (true or false) |
dmarc | host record of Dmarc |
domain | host record of Dmarc |
value | configuration value of Dmarc |
verify | whether the configuration is successful (true or false) |
create_time | time of domain creation |
update_time | time of domain modification |
Returned value example
Response-success
HTTP Status: 200
{
"result": {
"domain_id": 147799,
"name": "22edc.com",
"type": 1,
"spf": {
"domain": "22edc.com",
"value": "v=spf1 include:spf.email.engagelab.com -all",
"verify": false
},
"dkim": {
"domain": "mail._domainkey.22edc.com",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmiE1poIZgcYRhTCtmgC20ASZVABbMxZWHuPG1W4JBmmkaTOjjzCUSjpBvWxgHOtzPQcQ9F8PY9iL9b3WGajwtEaEiJjk6z6ezeZzDOyYUnk79B6lrcGmNOVKaJOyh5qSOr3N0t36BbO9g37+PqYhisZH3kORLCqMrTcHuUFsJ7QIDAQAB",
"verify": false
},
"mx": {
"domain": "22edc.com",
"value": "mx1.engagelab.com",
"verify": false
},
"dmarc": {
"domain": "_dmarc.22edc.com",
"value": "v=DMARC1;p=reject;ruf=mailto:dmarc@22edc.com;rua=mailto:dmarc_report@22edc.com",
"verify": false
},
"create_time": "2022-11-12T15:38:14+0800",
"update_time": "2022-12-15T10:52:05+0800"
}
}
Response-error
HTTP Status :400
{
"code": 31003,
"message": "Domain name format error"
}
Modify
Modify domains through this interface
URL
https://email.api.engagelab.cc/v1/domains/{domain_id}
Content-Type:
application/json; charset=utf-8
HTTP Request Method
PUT
Request Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | String | true | Basic base64(apiUser:apiKey) |
Body Parameter Description
Parameter | Type | Required or not | Description |
---|---|---|---|
name | string | yes | domain name. It must conform to the domain name format and can only contain [0-9a-zA-Z -.], 4~255 characters, such as mail.test.best. |
Tips:
Domains with verified configuration cannot be modified
Request Example
curl -X PUT "https://email.api.engagelab.cc/v1/domains/22332"
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
--header "Content-Type: application/json"
--data '{
"name":"aizl.net",
}'
Returned value description
Return to eligible domain information.
Parameter | Description |
---|---|
domain_id | domain Id |
name | domain name |
type | domain type |
spf | configuration of SPF |
domain | host record of SPF |
value | configuration value of SPF |
verify | whether the configuration is successful (true or false) |
dkim | configuration of DKIM |
domain | host record of DKIM |
value | configuration value of DKIM |
verify | whether the configuration is successful (true or false) |
mx | configuration of MX |
domain | host record of MX |
value | configuration value of MX |
verify | whether the configuration is successful (true or false) |
dmarc | host record of Dmarc |
domain | host record of Dmarc |
value | configuration value of Dmarc |
verify | whether the configuration is successful (true or false) |
create_time | time of domain creation |
update_time | time of domain modification |
Returned value example
Response-success
HTTP Status: 200
{
"result": {
"domain_id": 147799,
"name": "22edc.com",
"type": 1,
"spf": {
"domain": "22edc.com",
"value": "v=spf1 include:spf.email.engagelab.com -all",
"verify": false
},
"dkim": {
"domain": "mail._domainkey.22edc.com",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmiE1poIZgcYRhTCtmgC20ASZVABbMxZWHuPG1W4JBmmkaTOjjzCUSjpBvWxgHOtzPQcQ9F8PY9iL9b3WGajwtEaEiJjk6z6ezeZzDOyYUnk79B6lrcGmNOVKaJOyh5qSOr3N0t36BbO9g37+PqYhisZH3kORLCqMrTcHuUFsJ7QIDAQAB",
"verify": false
},
"mx": {
"domain": "22edc.com",
"value": "mx1.engagelab.com",
"verify": false
},
"dmarc": {
"domain": "_dmarc.22edc.com",
"value": "v=DMARC1;p=reject;ruf=mailto:dmarc@22edc.com;rua=mailto:dmarc_report@22edc.com",
"verify": false
},
"create_time": "2022-11-12T15:38:14+0800",
"update_time": "2022-11-22T13:39:05+0800"
}
}
Response-error
HTTP Status :400
{
"code": 31003,
"message": "Domain name format error"
}
Verify
Verify domains through this interface
URL
https://email.api.engagelab.cc/v1/domains/check
HTTP Request Method
GET
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
name | string | no | domain name. Multiple use ';' separate. |
Note
Return to domains with verified configuration.
Request Example
curl -X POST "https://email.api.engagelab.cc/v1/domains/check?name=aizl.net;m1214520.com"
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
Returned value description
Return to eligible domain information.
Parameter | Description |
---|---|
name | domain name |
type | domain type |
config | config object |
dkim | true or false |
mx | true or false |
spf | true or false |
dmarc | true or false |
status | 0:unverified ,1:usable 2:Verified |
Returned Value Example
Response-success
HTTP Status: 200
{
"result": [
{
"name": "abc.com",
"type": 1,
"config": {
"dkim": false,
"mx": false,
"spf": false,
"dmarc": false
},
"status": 2,
}
]
}
Response-error
HTTP Status :401
{
"code": 30000,
"message": "Authentication failed."
}