Sending Domains

📘

Do you have any questions on our Email API? Write to us at [email protected]

/settings/addSendingDomain

Adds a new sending domain to the account.

Example Request

{
    "owner_id": "example id",
    "token": "example token",
    "domain": "example.com"
}

Example Success Response

{
    "status": "success",
    "message": "Sending Domain Added"
}

Example Error Response

{
    "status": "error",
    "code": -1,
    "name": "AuthenticationError",
    "message": "Token MissMatch"
}

Parameters

ParameterTypeDescription
owner_id*stringa valid SendCleanUser Id
token*stringa valid token
domain*stringa valid domain name

*compulsory field

Return Value: Success

struct — the results of adding a sending domain

FieldTypeDescription
statusstringsuccess
messagestringhuman readable message

Return Value: Error

struct — the error results when attempting to add a sending domain

FieldTypeDescription
statusstringerror
messagestringhuman readable message
typestringone of the error types listed below

Error Types

ValidationError — The parameters passed to the API call are invalid or not provided when required.

GeneralError — An unexpected error occurred processing the request. SendClean Developers will be notified.

AuthenticationError — Provided owner_id and token was not matched.


/settings/checkSendingDomain

Validates DKIM and SPF records for a sending domain.

Example Request

{
    "owner_id": "example id",
    "token": "example token",
    "domain": "example.com"
}

Example Success Response

{
    "status": "success",
    "dkim_valid": true,
    "spf_valid": true,
    "signing_valid": true
}

Example Error Response

{
    "status": "error",
    "code": -1,
    "name": "AuthenticationError",
    "message": "Token MissMatch"
}

Parameters

ParameterTypeDescription
owner_id*stringa valid SendCleanUser Id
token*stringa valid token
domain*stringa valid domain name

*compulsory field

Return Value: Success

struct — the results of checking a sending domain

FieldTypeDescription
statusstringsuccess
dkim_validbooleanwhether DKIM record is valid
spf_validbooleanwhether SPF record is valid
signing_validbooleanoverall signing validity

Return Value: Error

struct — the error results when attempting to check a sending domain

FieldTypeDescription
statusstringerror
messagestringhuman readable message
typestringone of the error types listed below

Error Types

ValidationError — The parameters passed to the API call are invalid or not provided when required.

GeneralError — An unexpected error occurred processing the request. SendClean Developers will be notified.

AuthenticationError — Provided owner_id and token was not matched.


/settings/verifySendingDomain

Sends domain verification instructions to a mailbox address within the domain being verified.

Example Request

{
    "owner_id": "example id",
    "token": "example token",
    "domain": "example.com",
    "mailbox": "[email protected]"
}

Example Success Response

{
    "status": "success",
    "message": "Verification Email Sent"
}

Example Error Response

{
    "status": "error",
    "code": -1,
    "name": "AuthenticationError",
    "message": "Token MissMatch"
}

Parameters

ParameterTypeDescription
owner_id*stringa valid SendCleanUser Id
token*stringa valid token
domain*stringa valid domain name
mailbox*stringa valid mailbox address within the domain

*compulsory field

Return Value: Success

struct — the results of verifying a sending domain

FieldTypeDescription
statusstringsuccess
messagestringhuman readable message

Return Value: Error

struct — the error results when attempting to verify a sending domain

FieldTypeDescription
statusstringerror
messagestringhuman readable message
typestringone of the error types listed below

Error Types

ValidationError — The parameters passed to the API call are invalid or not provided when required.

GeneralError — An unexpected error occurred processing the request. SendClean Developers will be notified.

AuthenticationError — Provided owner_id and token was not matched.


/settings/listSendingDomain

Retrieves all sending domains associated with the account.

Example Request

{
    "owner_id": "example id",
    "token": "example token"
}

Example Success Response

{
    "status": "success",
    "domain_data": [
        {
            "domain": "example.com",
            "create_date": 1458034022169,
            "dkim_valid": true,
            "spf_valid": true,
            "domain_verified": true
        }
    ]
}

Example Error Response

{
    "status": "error",
    "code": -1,
    "name": "AuthenticationError",
    "message": "Token MissMatch"
}

Parameters

ParameterTypeDescription
owner_id*stringa valid SendCleanUser Id
token*stringa valid token

*compulsory field

Return Value: Success

struct — the results of listing sending domains

FieldTypeDescription
statusstringsuccess
domain_dataarrayarray of sending domain objects

**domain_data[]**fields:

FieldTypeDescription
domainstringdomain name
create_dateintegercreation date in seconds
dkim_validbooleanwhether DKIM record is valid
spf_validbooleanwhether SPF record is valid
domain_verifiedbooleanwhether domain is verified

Return Value: Error

struct — the error results when attempting to list sending domains

FieldTypeDescription
statusstringerror
messagestringhuman readable message
typestringone of the error types listed below

Error Types

ValidationError — The parameters passed to the API call are invalid or not provided when required.

GeneralError — An unexpected error occurred processing the request. SendClean Developers will be notified.

AuthenticationError — Provided owner_id and token was not matched.


/settings/deleteSendingDomain

Removes a sending domain from the account.

Example Request

{
    "owner_id": "example id",
    "token": "example token",
    "domain": "example.com"
}

Example Success Response

{
    "status": "success",
    "message": "Sending Domain Deleted"
}

Example Error Response

{
    "status": "error",
    "code": -1,
    "name": "AuthenticationError",
    "message": "Token MissMatch"
}

Parameters

ParameterTypeDescription
owner_id*stringa valid SendCleanUser Id
token*stringa valid token
domain*stringa valid domain name

*compulsory field

Return Value: Success

struct — the results of deleting a sending domain

FieldTypeDescription
statusstringsuccess
messagestringhuman readable message

Return Value: Error

struct — the error results when attempting to delete a sending domain

FieldTypeDescription
statusstringerror
messagestringhuman readable message
typestringone of the error types listed below

Error Types

ValidationError — The parameters passed to the API call are invalid or not provided when required.

GeneralError — An unexpected error occurred processing the request. SendClean Developers will be notified.

AuthenticationError — Provided owner_id and token was not matched.


Did this page help you?