Track Domain
User must configure the mail domain to send emails by SendCloud.
You can query, add or modify the domain.
Query (Batch Query)
Query track domain through this interface.
URL
https://api.sendcloud.net/apiv2/trackDomain/list
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| apiUser | string | yes | API_USER |
| apiKey | string | yes | API_KEY |
| name | string | no | track name, multiple names are separated by semicolons |
| start | int | no | amount, [0-100], defaults to 100 |
| limit | int | no | amount, [0-100], defaults to 100 |
https://api.sendcloud.net/apiv2/trackDomain/list?apiUser=***&apiKey=***&name=ifaxin.com
Returned value description
| Parameter | Description |
|---|---|
| id | track ID |
| name | track name |
| cname | cname configuration, true: passed false: failed |
| gmtCreated | time of track creation |
| gmtUpdated | time of track modification |
| cname.domain | track host records |
| cname.value | record value to configure for track |
| https | https configuration, true:configured false:not configured |
| certiValidityStart | The start time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
| certiValidityEnd | The end time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
返回值示例
{
"info": {
"dataList": [
{
"id": 999225,
"name": "track2.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
},
{
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
],
"total": 2,
"count": 2
},
"statusCode": 200,
"message": "request was successful",
"result": true
}
Add
Add track domains through this interface
URL
https://api.sendcloud.net/apiv2/trackDomain/add
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| apiUser | string | yes | API_USER |
| apiKey | string | yes | API_KEY |
| name | string | yes | track name, comply with the domain name specification, the length does not exceed 255 characters |
| certContent | string | no | certificate content(PEM format) |
| certKey | string | no | certificate private key(PEM format) |
Note
1. The tracking domain name cannot be the same as any sending domain name.
2. CertContent and CertKey must both be empty or pass values simultaneously.
3. A user may add a maximum of 5 domains for tracking. If you require more than five tracking domains, kindly reach out to our customer support team.
Request Example
https://api.sendcloud.net/apiv2/trackDomain/add?apiUser=***&apiKey=***&name=mail.liubida.cn
Returned value description
| Parameter | Description |
|---|---|
| id | track ID |
| name | track name |
| cname | cname configuration, true: passed,false: failed |
| gmtCreated | time of track creation |
| gmtUpdated | time of track modification |
| cname.domain | track host records |
| cname.value | record value to configure for track |
| https | https configuration, true:configured,false:not configured |
| certiValidityStart | The start time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
| certiValidityEnd | The end time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
Returned value example
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
data: {
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
}
}
Modify
Modify track domains through this interface
URL
https://api.sendcloud.net/apiv2/trackDomain/update
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| apiUser | string | yes | API_USER |
| apiKey | string | yes | API_KEY |
| id | Integer | yes | track id |
| name | string | no | new track name |
| certContent | string | no | certificate content(PEM format) |
| certKey | string | no | certificate private key(PEM format) |
Request Example
https://api.sendcloud.net/apiv2/trackDomain/update?apiUser=***&apiKey=***&name=mail.liubida.cn
Returned value description
| Parameter | Description |
|---|---|
| id | track ID |
| name | track name |
| cname | cname configuration, true: passed,false: failed |
| gmtCreated | time of track creation |
| gmtUpdated | time of track modification |
| cname.domain | track host records |
| cname.value | record value to configure for track |
| https | https configuration, true:configured,false:not configured |
| certiValidityStart | The start time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
| certiValidityEnd | The end time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
Returned value example
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
data: {
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
}
}
Delete
Delete track domains through this interface
URL
https://api.sendcloud.net/apiv2/trackDomain/delete
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| apiUser | string | yes | API_USER |
| apiKey | string | yes | API_KEY |
| id | int | yes | track ID |
Request Example
https://api.sendcloud.net/apiv2/trackDomain/delete?apiUser=***&apiKey=***&id=48036
Returned value description
| Parameter | Description |
|---|---|
| count | Number of items successfully deleted |
Returned value example
{
"statusCode": 200,
"info": {
"count": 1
},
"message": "请求成功",
"result": true
}
Verify
Verify track domains through this interface
URL
https://api.sendcloud.net/apiv2/trackDomain/checkConfig
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| apiUser | string | yes | API_USER |
| apiKey | string | yes | API_KEY |
| id | string | no | track id, multiple ids are separated by semicolons |
| name | string | no | track name, multiple names are separated by semicolons |
Note
1. Calling this interface will update the status of cname.
2. Both id and name cannot be blank simultaneously.
Request Example
https://api.sendcloud.net/apiv2/trackDomain/checkConfig?apiUser=***&apiKey=***&id=48036
Returned value description
| Parameter | Description |
|---|---|
| id | track ID |
| name | track name |
| cname | cname configuration, true: passed,false: failed |
| gmtCreated | time of track creation |
| gmtUpdated | time of track modification |
| cname.domain | track host records |
| cname.value | record value to configure for track |
| https | https configuration, true:configured,false:not configured |
| certiValidityStart | The start time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
| certiValidityEnd | The end time of the SSL certificate validity period( yyyy-MM-dd HH:mm:ss) |
Returned value example
{
"info": {
"dataList": [
{
"id": 999225,
"name": "track2.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
},
{
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
],
"count": 2
},
"statusCode": 200,
"message": "request was successful",
"result": true
}