const response = await fetch('https://api.emailit.com/v2/sending-domains/sd_1234567890/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
'Content-Type': 'application/json'
}
});
const result = await response.json();
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.emailit.com/v2/sending-domains/sd_1234567890/verify',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer em_test_51RxCWJ...vS00p61e0qRE',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
$result = json_decode($response, true);
print_r($result);
}
import requests
response = requests.post(
'https://api.emailit.com/v2/sending-domains/sd_1234567890/verify',
headers={
'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
'Content-Type': 'application/json'
}
)
result = response.json()
print(result)
require 'net/http'
require 'json'
uri = URI('https://api.emailit.com/v2/sending-domains/sd_1234567890/verify')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer em_test_51RxCWJ...vS00p61e0qRE'
request['Content-Type'] = 'application/json'
response = http.request(request)
result = JSON.parse(response.body)
puts result
curl -X POST https://api.emailit.com/v2/sending-domains/sd_1234567890/verify \
-H "Authorization: Bearer em_test_51RxCWJ...vS00p61e0qRE" \
-H "Content-Type: application/json"
Verify sending domain
const response = await fetch('https://api.emailit.com/v2/sending-domains/sd_1234567890/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
'Content-Type': 'application/json'
}
});
const result = await response.json();
{
"object": "sending_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,
"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
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
}
{
"object": "sending_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,
"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
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
}
{
"error": {
"code": 401,
"message": "Unauthorized"
}
}
{
"error": {
"code": 404,
"message": "Sending domain not found"
}
}
Responses
{
"object": "sending_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,
"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
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
}