Tracking Domains Calls
Info! Do you have any questions on our Email API?
Write to us at support@sendclean.com
/settings/addTrackingDomain
Add a new Tracking Domains
var SendClean= require('./SendClean.js');
var SendClean_client = new SendClean.SendClean('owner_id', 'token', 'SendCleanTES_APP_DOMAIN');
SendClean_client.settings.addTrackingDomain({domain:"abc.com"}, function(result) {
console.log(result);
/*
{
"status" : "success",
"message" : "Tracking Domain Added"
}
*/
}, function(e) {
// SendCleanreturns the error as an object with name and message keys
console.log('A SendCleanerror occurred: ' + e.name + ' - ' + e.message);
});
{
"status" : "success",
"message" : "Tracking Domain Added"
}
{
"status"=> "error",
"code"=> -1,
"name"=> "AuthenticationError",
"message"=> "Token MissMatch"
}
| Parameters |
| owner_id* string |
a valid SendCleanUser Id |
| token* string |
a valid token |
| SendCleanTES_APP_DOMAIN* string |
a valid SendCleanTES APP DOMAIN |
| domain* string |
domain name |
* compulsory field
| Return Value: Success |
| struct |
the results of newly Added Domain
| status string |
always success |
| message string |
human readable message |
|
|
| Return Value: Error |
| struct |
the error results when attempt to add domain
| status string |
error |
| message string |
human readable message |
| type string |
one of the error type as bellow table |
|
|
| Error types |
| ValidationError |
The parameters passed to the API call are invalid or not provided when required. |
| GeneralError |
An unexpected errors occurred processing the request. SendCleanDevelopers will be notified. |
| AuthenticationError |
Provided owner_id and token was not matched. |
/settings/checkTrackingDomain
check Tracking Domain
var SendClean= require('./SendClean.js');
var SendClean_client = new SendClean.SendClean('owner_id', 'token', 'SendCleanTES_APP_DOMAIN');
SendClean_client.settings.checkTrackingDomain({domain:"abc.com"}, function(result) {
console.log(result);
/*
{
"status" : "success",
"domain" : "abc.com",
"valid_tracking" : "Yes",
"cname" : {"valid" : "Yes"}
}
*/
}, function(e) {
// SendCleanreturns the error as an object with name and message keys
console.log('A SendCleanerror occurred: ' + e.name + ' - ' + e.message);
});
{
"status" : "success",
"domain" : "abc.com",
"valid_tracking" : "Yes",
"cname" : {"valid" : "Yes"}
}
{
"status"=> "error",
"code"=> -1,
"name"=> "AuthenticationError",
"message"=> "Token MissMatch"
}
| Parameters |
| owner_id* string |
a valid SendCleanUser Id |
| token* string |
a valid token |
| SendCleanTES_APP_DOMAIN* string |
a valid SendCleanTES APP DOMAIN |
| domain* string |
domain name |
* compulsory field
| Return Value: Success |
| struct |
the results of check Tracking Domain
| status string |
always success |
| message string |
human readable message |
| valid_tracking string |
value is Either 'Yes' OR 'No' |
| cname[]struct |
cname validation result
| valid string |
value is either 'Yes' OR 'No' |
|
|
|
| Return Value: Error |
| struct |
the error results when attempt check Tracking Domain
| status string |
error |
| message string |
human readable message |
| type string |
one of the error type as bellow table |
|
|
| Error types |
| ValidationError |
The parameters passed to the API call are invalid or not provided when required. |
| GeneralError |
An unexpected errors occurred processing the request. SendCleanDevelopers will be notified. |
| AuthenticationError |
Provided owner_id and token was not matched. |
/settings/listTrackingDomain
List Tracking Domain
var SendClean= require('./SendClean.js');
var SendClean_client = new SendClean.SendClean('owner_id', 'token', 'SendCleanTES_APP_DOMAIN');
SendClean_client.settings.listTrackingDomain({}, function(result) {
console.log(result);
/*
{
"status" : "success",
"tracking_domain_list" : [
{
"domain":"abc.com",
"create_date":67457775764,
"cname":{"valid" : "Yes"}
},
{
"domain":"xyz.com",
"create_date":67457775891,
"cname":{"valid" : "Yes"}
}
]
}
*/
}, function(e) {
// SendCleanreturns the error as an object with name and message keys
console.log('A SendCleanerror occurred: ' + e.name + ' - ' + e.message);
});
{
"status" : "success",
"tracking_domain_list" : [
{
"domain":"abc.com",
"create_date":67457775764,
"cname":{"valid" : "Yes"}
},
{
"domain":"xyz.com",
"create_date":67457775891,
"cname":{"valid" : "Yes"}
}
]
}
{
"status"=> "error",
"code"=> -1,
"name"=> "AuthenticationError",
"message"=> "Token MissMatch"
}
| Parameters |
| owner_id* string |
a valid SendCleanUser Id |
| token* string |
a valid token |
| SendCleanTES_APP_DOMAIN* string |
a valid SendCleanTES APP DOMAIN |
* compulsory field
| Return Value: Success |
| struct |
the results of List Tracking Domain
| status string |
always success |
| message string |
human readable message |
| tracking_domain_list[]struct |
information of single Tracking Domain
| domain string |
domain name |
| create_date integer |
create date in micro seconds |
| cname[]struct |
cname validation result
| valid string |
value is Either 'Yes' OR 'No' |
|
|
|
|
|
| Return Value: Error |
| struct |
the error results when attempt to List Tracking Domain
| status string |
error |
| message string |
human readable message |
| type string |
one of the error type as bellow table |
|
|
| Error types |
| ValidationError |
The parameters passed to the API call are invalid or not provided when required. |
| GeneralError |
An unexpected errors occurred processing the request. SendCleanDevelopers will be notified. |
| AuthenticationError |
Provided owner_id and token was not matched. |
/settings/deleteTrackingDomain
Delete Tracking Domain
var SendClean= require('./SendClean.js');
var SendClean_client = new SendClean.SendClean('owner_id', 'token', 'SendCleanTES_APP_DOMAIN');
SendClean_client.settings.deleteTrackingDomain({domain:"abc.com"}, function(result) {
console.log(result);
/*
{
"status" : "success",
"message" : "Tracking Domain Deleted"
}
*/
}, function(e) {
// SendCleanreturns the error as an object with name and message keys
console.log('A SendCleanerror occurred: ' + e.name + ' - ' + e.message);
});
{
"status" : "success",
"message" : "Tracking Domain Deleted"
}
{
"status"=> "error",
"code"=> -1,
"name"=> "AuthenticationError",
"message"=> "Token MissMatch"
}
| Parameters |
| owner_id* string |
a valid SendCleanUser Id |
| token* string |
a valid token |
| SendCleanTES_APP_DOMAIN* string |
a valid SendCleanTES APP DOMAIN |
| domain* string |
domain name |
* compulsory field
| Return Value: Success |
| struct |
the results of Delete Tracking domain
| status string |
always success |
| message string |
human readable message |
|
|
| Return Value: Error |
| struct |
the error results when attempt to Delete Tracking Domain
| status string |
error |
| message string |
human readable message |
| type string |
one of the error type as bellow table |
|
|
| Error types |
| ValidationError |
The parameters passed to the API call are invalid or not provided when required. |
| GeneralError |
An unexpected errors occurred processing the request. SendCleanDevelopers will be notified. |
| AuthenticationError |
Provided owner_id and token was not matched. |