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
| Parameter | Type | Description |
|---|---|---|
| owner_id* | string | a valid SendCleanUser Id |
| token* | string | a valid token |
| domain* | string | a valid domain name |
*compulsory field
Return Value: Success
struct — the results of adding a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | success |
| message | string | human readable message |
Return Value: Error
struct — the error results when attempting to add a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | error |
| message | string | human readable message |
| type | string | one 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
| Parameter | Type | Description |
|---|---|---|
| owner_id* | string | a valid SendCleanUser Id |
| token* | string | a valid token |
| domain* | string | a valid domain name |
*compulsory field
Return Value: Success
struct — the results of checking a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | success |
| dkim_valid | boolean | whether DKIM record is valid |
| spf_valid | boolean | whether SPF record is valid |
| signing_valid | boolean | overall signing validity |
Return Value: Error
struct — the error results when attempting to check a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | error |
| message | string | human readable message |
| type | string | one 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
| Parameter | Type | Description |
|---|---|---|
| owner_id* | string | a valid SendCleanUser Id |
| token* | string | a valid token |
| domain* | string | a valid domain name |
| mailbox* | string | a valid mailbox address within the domain |
*compulsory field
Return Value: Success
struct — the results of verifying a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | success |
| message | string | human readable message |
Return Value: Error
struct — the error results when attempting to verify a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | error |
| message | string | human readable message |
| type | string | one 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
| Parameter | Type | Description |
|---|---|---|
| owner_id* | string | a valid SendCleanUser Id |
| token* | string | a valid token |
*compulsory field
Return Value: Success
struct — the results of listing sending domains
| Field | Type | Description |
|---|---|---|
| status | string | success |
| domain_data | array | array of sending domain objects |
**domain_data[]**fields:
| Field | Type | Description |
|---|---|---|
| domain | string | domain name |
| create_date | integer | creation date in seconds |
| dkim_valid | boolean | whether DKIM record is valid |
| spf_valid | boolean | whether SPF record is valid |
| domain_verified | boolean | whether domain is verified |
Return Value: Error
struct — the error results when attempting to list sending domains
| Field | Type | Description |
|---|---|---|
| status | string | error |
| message | string | human readable message |
| type | string | one 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
| Parameter | Type | Description |
|---|---|---|
| owner_id* | string | a valid SendCleanUser Id |
| token* | string | a valid token |
| domain* | string | a valid domain name |
*compulsory field
Return Value: Success
struct — the results of deleting a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | success |
| message | string | human readable message |
Return Value: Error
struct — the error results when attempting to delete a sending domain
| Field | Type | Description |
|---|---|---|
| status | string | error |
| message | string | human readable message |
| type | string | one 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.
Updated about 2 months ago