Create Domain
Create a domain through the Emailit API.
/domainsRequest Body
namestringRequiredThe name of the domain, in the format of mail.yourdomain.com.
track_loadsbooleanWhether to track email loads for this domain (default: false).
track_clicksbooleanWhether to track email clicks for this domain (default: false).
{
"object": "domain",
"id": 1234567890,
"uuid": "sd_1234567890",
"name": "mail.yourdomain.com",
"verification_token": "abc123def456",
"verification_method": "dns",
"verified_at": null,
"dkim_identifier_string": "emailit._domainkey",
"dns_checked_at": null,
"spf_status": null,
"spf_error": null,
"dkim_status": null,
"dkim_error": null,
"mx_status": null,
"mx_error": null,
"return_path_status": null,
"return_path_error": null,
"dmarc_status": null,
"dmarc_error": null,
"tracking_status": null,
"tracking_error": null,
"inbound_status": null,
"inbound_error": null,
"track_loads": 0,
"track_clicks": 0,
"dns_records": [
{
"required": true,
"type": "MX",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "feedback-smtp.ffdc-1.emailit.com",
"priority": 10,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "v=spf1 include:_spf.emailit.com ~all",
"priority": null,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "emailit._domainkey.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "v=DKIM1; t=s; h=sha256; p=MIGfMA0...",
"priority": null,
"error": null
},
{
"required": false,
"type": "TXT",
"name": "_dmarc.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "v=DMARC1; p=none;",
"priority": null,
"error": null
},
{
"required": false,
"type": "CNAME",
"name": "tr.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "go.emailitmail.com",
"priority": null,
"error": null
},
{
"required": false,
"type": "MX",
"name": "inbound.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "inbound.emailitmail.com",
"priority": 10,
"error": null
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
} {
"error": {
"code": 400,
"message": "Bad Request"
}
} {
"error": {
"code": 409,
"message": "Domain already exists"
},
"existing": {
"object": "domain",
"id": 1234567890,
"name": "mail.yourdomain.com"
}
} Get Domain
Retrieve information about a specific domain in your Emailit account.
/domains/{id}Path Parameters
idstringRequiredThe ID of the domain to retrieve.
{
"object": "domain",
"id": 1234567890,
"uuid": "sd_1234567890",
"name": "mail.yourdomain.com",
"verification_token": "abc123def456",
"verification_method": "dns",
"verified_at": "2021-01-01T12:00:00Z",
"dkim_identifier_string": "emailit._domainkey",
"dns_checked_at": "2021-01-01T12:00:00Z",
"spf_status": "ok",
"spf_error": null,
"dkim_status": "ok",
"dkim_error": null,
"mx_status": "ok",
"mx_error": null,
"return_path_status": "ok",
"return_path_error": null,
"dmarc_status": "ok",
"dmarc_error": null,
"tracking_status": "ok",
"tracking_error": null,
"inbound_status": "ok",
"inbound_error": null,
"track_loads": 0,
"track_clicks": 0,
"dns_records": [
{
"required": true,
"type": "MX",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "feedback-smtp.ffdc-1.emailit.com",
"priority": 10,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=spf1 include:_spf.emailit.com ~all",
"priority": null,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "emailit._domainkey.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=DKIM1; t=s; h=sha256; p=MIGfMA0G...",
"priority": null,
"error": null
},
{
"required": false,
"type": "TXT",
"name": "_dmarc.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=DMARC1; p=none;",
"priority": null,
"error": null
},
{
"required": false,
"type": "CNAME",
"name": "tr.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "go.emailitmail.com",
"priority": null,
"error": null
},
{
"required": false,
"type": "MX",
"name": "inbound.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "inbound.emailitmail.com",
"priority": 10,
"error": null
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
} {
"error": {
"code": 401,
"message": "Unauthorized"
}
} {
"error": {
"code": 404,
"message": "Domain not found"
}
} Verify Domain
Verify that the required DNS records have been correctly configured for a domain. This endpoint checks all DNS records (MX, SPF, DKIM, and DMARC) and updates the domain’s verification status.
/domains/{id}/verifyPath Parameters
idstringRequiredThe ID of the domain to verify.
{
"object": "domain",
"id": 1234567890,
"uuid": "sd_1234567890",
"name": "mail.yourdomain.com",
"verification_token": "abc123def456",
"verification_method": "dns",
"verified_at": "2021-01-01T12:00:00Z",
"dkim_identifier_string": "emailit._domainkey",
"dns_checked_at": "2021-01-01T12:00:00Z",
"spf_status": "ok",
"spf_error": null,
"dkim_status": "ok",
"dkim_error": null,
"mx_status": "ok",
"mx_error": null,
"return_path_status": "ok",
"return_path_error": null,
"dmarc_status": "ok",
"dmarc_error": null,
"tracking_status": "ok",
"tracking_error": null,
"inbound_status": "ok",
"inbound_error": null,
"track_loads": 0,
"track_clicks": 0,
"dns_records": [
{
"required": true,
"type": "MX",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "feedback-smtp.ffdc-1.emailit.com",
"priority": 10,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=spf1 include:_spf.emailit.com ~all",
"priority": null,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "emailit._domainkey.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=DKIM1; t=s; h=sha256; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+hb3/Ew7dLpCYVAThs29xMy2aWDPhhdMarieUn/N6x8DOaMar3BQV3ilzUb5F+axVxSYisd6mw9FGuZ48uD2KcOXBWjl5E1R5pYuB13KuVwXUwyzsEeYsGE6kYIpu7Rxn3wQvcGhCrx3RK30Hyw0yNpAcpUtmo+wbIYkJutOquwIDAQAB;",
"priority": null,
"error": null
},
{
"required": false,
"type": "TXT",
"name": "_dmarc.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=DMARC1; p=none;",
"priority": null,
"error": null
},
{
"required": false,
"type": "CNAME",
"name": "tr.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "go.emailitmail.com",
"priority": null,
"error": null
},
{
"required": false,
"type": "MX",
"name": "inbound.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "inbound.emailitmail.com",
"priority": 10,
"error": null
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
} {
"object": "domain",
"id": 1234567890,
"uuid": "sd_1234567890",
"name": "mail.yourdomain.com",
"verification_token": "abc123def456",
"verification_method": "dns",
"verified_at": null,
"dkim_identifier_string": "emailit._domainkey",
"dns_checked_at": "2021-01-01T12:00:00Z",
"spf_status": "failed",
"spf_error": "SPF record not found",
"dkim_status": "failed",
"dkim_error": "DKIM record not found",
"mx_status": "ok",
"mx_error": null,
"return_path_status": "ok",
"return_path_error": null,
"dmarc_status": "pending",
"dmarc_error": null,
"tracking_status": "missing",
"tracking_error": "There are no CNAME records at tr.yourdomain.com",
"inbound_status": "missing",
"inbound_error": "There are no MX records at inbound.yourdomain.com",
"track_loads": 0,
"track_clicks": 0,
"dns_records": [
{
"required": true,
"type": "MX",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "feedback-smtp.ffdc-1.emailit.com",
"priority": 10,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "failed",
"value": "v=spf1 include:_spf.emailit.com ~all",
"priority": null,
"error": "SPF record not found"
},
{
"required": true,
"type": "TXT",
"name": "emailit._domainkey.yourdomain.com",
"ttl": "auto",
"status": "failed",
"value": "v=DKIM1; t=s; h=sha256; p=MIGfMA....",
"priority": null,
"error": "DKIM record not found"
},
{
"required": false,
"type": "TXT",
"name": "_dmarc.yourdomain.com",
"ttl": "auto",
"status": "pending",
"value": "v=DMARC1; p=none;",
"priority": null,
"error": null
},
{
"required": false,
"type": "CNAME",
"name": "tr.yourdomain.com",
"ttl": "auto",
"status": "missing",
"value": "go.emailitmail.com",
"priority": null,
"error": "There are no CNAME records at tr.yourdomain.com"
},
{
"required": false,
"type": "MX",
"name": "inbound.yourdomain.com",
"ttl": "auto",
"status": "missing",
"value": "inbound.emailitmail.com",
"priority": 10,
"error": "There are no MX records at inbound.yourdomain.com"
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
} {
"error": {
"code": 401,
"message": "Unauthorized"
}
} {
"error": {
"code": 404,
"message": "Domain not found"
}
} DNS Record Status
The dns_records array contains detailed information about each DNS record required for the domain:
| Field | Type | Description |
|---|---|---|
required | boolean | Whether this DNS record is required for verification |
type | string | DNS record type (MX, TXT, CNAME) |
name | string | The hostname for the DNS record |
ttl | string | Time to live for the DNS record |
status | string | Verification status: ok, pending, failed, missing |
value | string | The value that should be set for this DNS record |
priority | number/null | Priority for MX records, null for others |
error | string/null | Error message if verification failed |
Verification Process
- The endpoint checks all required DNS records (MX, SPF, DKIM)
- Optional DMARC record is also checked but not required for verification
- The domain is considered verified only when all required records pass
- The
verified_attimestamp is set when all required checks pass - Individual record statuses are stored in the
dns_recordsarray
Update Domain
Update an existing domain in your Emailit account.
/domains/{id}Path Parameters
idstringRequiredThe ID of the domain to update.
Request Body
track_loadsbooleanWhether to track email loads for this domain (true/false).
track_clicksbooleanWhether to track email clicks for this domain (true/false).
tracking_keystringCustom subdomain key for the tracking CNAME record (default: null). When set, the tracking CNAME will use this value instead of the default go.
inbound_keystringCustom subdomain key for the inbound MX record (default: null). When set, the inbound MX will use this value instead of the default inbound.
{
"object": "domain",
"id": 1234567890,
"uuid": "sd_1234567890",
"name": "mail.yourdomain.com",
"verification_token": "abc123def456",
"verification_method": "dns",
"verified_at": "2021-01-01T12:00:00Z",
"dkim_identifier_string": "emailit._domainkey",
"dns_checked_at": "2021-01-01T12:00:00Z",
"spf_status": "ok",
"spf_error": null,
"dkim_status": "ok",
"dkim_error": null,
"mx_status": "ok",
"mx_error": null,
"return_path_status": "ok",
"return_path_error": null,
"dmarc_status": "ok",
"dmarc_error": null,
"tracking_status": "ok",
"tracking_error": null,
"inbound_status": "ok",
"inbound_error": null,
"track_loads": 1,
"track_clicks": 0,
"dns_records": [
{
"required": true,
"type": "MX",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "feedback-smtp.ffdc-1.emailit.com",
"priority": 10,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "mail.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=spf1 include:_spf.emailit.com ~all",
"priority": null,
"error": null
},
{
"required": true,
"type": "TXT",
"name": "emailit._domainkey.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=DKIM1; t=s; h=sha256; p=MIGfMA0G...",
"priority": null,
"error": null
},
{
"required": false,
"type": "TXT",
"name": "_dmarc.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "v=DMARC1; p=none;",
"priority": null,
"error": null
},
{
"required": false,
"type": "CNAME",
"name": "go.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "go.emailitmail.com",
"priority": null,
"error": null
},
{
"required": false,
"type": "MX",
"name": "inbound.yourdomain.com",
"ttl": "auto",
"status": "ok",
"value": "inbound.emailitmail.com",
"priority": 10,
"error": null
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
} {
"error": {
"code": 400,
"message": "Bad Request"
}
} {
"error": {
"code": 404,
"message": "Domain not found"
}
} {
"error": {
"code": 409,
"message": "Conflict"
}
} List Domains
Retrieve a list of all domains in your Emailit account.
/domainsQuery Parameters
pageintegerPage number for pagination (minimum: 1).
limitintegerNumber of domains to return (minimum: 1, maximum: 100).
{
"data": [
{
"id": 1234567890,
"uuid": "sd_1234567890",
"name": "mail.yourdomain.com",
"track_loads": true,
"track_clicks": true,
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
},
{
"id": 987654321,
"uuid": "sd_0987654321",
"name": "mail2.yourdomain.com",
"track_loads": true,
"track_clicks": true,
"created_at": "2021-01-02T00:00:00Z",
"updated_at": "2021-01-02T00:00:00Z"
}
],
"next_page_url": "https://api.emailit.com/v2/domains?page=2&limit=10",
"previous_page_url": null
} {
"error": {
"code": 401,
"message": "Unauthorized"
}
} Delete Domain
Delete a domain from your Emailit account.
/domains/{id}Path Parameters
idstringRequiredThe ID of the domain to delete.
{
"object": "domain",
"id": 1234567890,
"name": "mail.yourdomain.com",
"deleted": true
} {
"error": {
"code": 404,
"message": "Domain not found"
}
}