Domain

Última actualización:2023-03-14

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
          https://email.api.engagelab.cc/v1/domains

        
Este bloque de código se muestra en una ventana flotante

HTTP Request Method

GET
          GET

        
Este bloque de código se muestra en una ventana flotante

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>>"
          curl "https://email.api.engagelab.cc/v1/domains?name=engagelab.com;xjm.cc" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
Este bloque de código se muestra en una ventana flotante

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 }
          {
    "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
}

        
Este bloque de código se muestra en una ventana flotante

Response-error

HTTP Status :401

{ "code": 30000, "message": "Authentication failed." }
          { 
    "code": 30000,
    "message": "Authentication failed."
}

        
Este bloque de código se muestra en una ventana flotante

Add

Add domains through this interface

URL

https://email.api.engagelab.cc/v1/domains
          https://email.api.engagelab.cc/v1/domains

        
Este bloque de código se muestra en una ventana flotante

Content-Type:

application/json; charset=utf-8
          application/json; charset=utf-8

        
Este bloque de código se muestra en una ventana flotante

HTTP Request Method

POST
          POST

        
Este bloque de código se muestra en una ventana flotante

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
          1.Each user can add up to  5 domains

        
Este bloque de código se muestra en una ventana flotante

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", }'
          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",
}'

        
Este bloque de código se muestra en una ventana flotante

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" } }
          {
    "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"
        }
}

        
Este bloque de código se muestra en una ventana flotante

Response-error

HTTP Status :400

{ "code": 31003, "message": "Domain name format error" }
          {
    
    "code": 31003,
    "message": "Domain name format error"
}

        
Este bloque de código se muestra en una ventana flotante

Modify

Modify domains through this interface

URL

https://email.api.engagelab.cc/v1/domains/{domain_id}
          https://email.api.engagelab.cc/v1/domains/{domain_id}

        
Este bloque de código se muestra en una ventana flotante

Content-Type:

application/json; charset=utf-8
          application/json; charset=utf-8

        
Este bloque de código se muestra en una ventana flotante

HTTP Request Method

PUT
          PUT

        
Este bloque de código se muestra en una ventana flotante

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
          Domains with verified configuration cannot be modified

        
Este bloque de código se muestra en una ventana flotante

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", }'
          
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",
}'

        
Este bloque de código se muestra en una ventana flotante

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" } }
          
{
        "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"
        }
    
}

        
Este bloque de código se muestra en una ventana flotante

Response-error

HTTP Status :400

{ "code": 31003, "message": "Domain name format error" }
          {
    
    "code": 31003,
    "message": "Domain name format error"
}

        
Este bloque de código se muestra en una ventana flotante

Verify

Verify domains through this interface

URL

https://email.api.engagelab.cc/v1/domains/check
          https://email.api.engagelab.cc/v1/domains/check

        
Este bloque de código se muestra en una ventana flotante

HTTP Request Method

GET
          GET

        
Este bloque de código se muestra en una ventana flotante

Parameter Description

parameter type required or not description
name string no domain name. Multiple use ';'  separate.

Note

Return to domains with verified configuration.
          Return to domains with verified configuration.

        
Este bloque de código se muestra en una ventana flotante

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>>"
          curl -X POST "https://email.api.engagelab.cc/v1/domains/check?name=aizl.net;m1214520.com" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
Este bloque de código se muestra en una ventana flotante

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, } ] }
          {
        "result": [
            {
                "name": "abc.com",
                "type": 1,
                "config": {
                    "dkim": false,
                    "mx": false,
                    "spf": false,
                    "dmarc": false
                },
                "status": 2,
            }
        ]
    
}

        
Este bloque de código se muestra en una ventana flotante

Response-error

HTTP Status :401

{ "code": 30000, "message": "Authentication failed." }
          {
    "code": 30000,
    "message": "Authentication failed."
}

        
Este bloque de código se muestra en una ventana flotante
在文档中心打开
icon
Contacto