Add an email domain
curl --request POST \
--url https://api.aefer.ai/api/v1/email_domains \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "mail.acme.com"
}
'import requests
url = "https://api.aefer.ai/api/v1/email_domains"
payload = { "domain": "mail.acme.com" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'mail.acme.com'})
};
fetch('https://api.aefer.ai/api/v1/email_domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aefer.ai/api/v1/email_domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain' => 'mail.acme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aefer.ai/api/v1/email_domains"
payload := strings.NewReader("{\n \"domain\": \"mail.acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aefer.ai/api/v1/email_domains")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"mail.acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aefer.ai/api/v1/email_domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"mail.acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "edm_01m7a4k2r9s8x7c2dvq3m5n6p4",
"object": "email_domain",
"domain": "mail.acme.com",
"status": "pending",
"dns_records": [
{
"type": "CNAME",
"host": "aefer.mail.acme.com",
"value": "rp.sg1.dkim.aefer.ai",
"valid": false
},
{
"type": "CNAME",
"host": "s1._domainkey.mail.acme.com",
"value": "s1.sg1.dkim.aefer.ai",
"valid": false
},
{
"type": "CNAME",
"host": "s2._domainkey.mail.acme.com",
"value": "s2.sg1.dkim.aefer.ai",
"valid": false
},
{
"type": "TXT",
"host": "_aefer.mail.acme.com",
"value": "aefer-verification=2kVh9wQx7LmN3pR8sT4uY6zA",
"valid": false
}
],
"verified_at": null,
"last_checked_at": null,
"expires_at": "2026-11-27T10:02:11Z",
"created_at": "2026-11-20T10:02:11Z"
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}Email domains
Add an email domain
Registers a domain your account sends summary emails from and answers the four records to
add at your DNS provider. The domain stays pending until all four resolve;
see the email domain object. Up to 10 per account.
Needs an account key.
POST
/
email_domains
Add an email domain
curl --request POST \
--url https://api.aefer.ai/api/v1/email_domains \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "mail.acme.com"
}
'import requests
url = "https://api.aefer.ai/api/v1/email_domains"
payload = { "domain": "mail.acme.com" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'mail.acme.com'})
};
fetch('https://api.aefer.ai/api/v1/email_domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aefer.ai/api/v1/email_domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain' => 'mail.acme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aefer.ai/api/v1/email_domains"
payload := strings.NewReader("{\n \"domain\": \"mail.acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aefer.ai/api/v1/email_domains")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"mail.acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aefer.ai/api/v1/email_domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"mail.acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "edm_01m7a4k2r9s8x7c2dvq3m5n6p4",
"object": "email_domain",
"domain": "mail.acme.com",
"status": "pending",
"dns_records": [
{
"type": "CNAME",
"host": "aefer.mail.acme.com",
"value": "rp.sg1.dkim.aefer.ai",
"valid": false
},
{
"type": "CNAME",
"host": "s1._domainkey.mail.acme.com",
"value": "s1.sg1.dkim.aefer.ai",
"valid": false
},
{
"type": "CNAME",
"host": "s2._domainkey.mail.acme.com",
"value": "s2.sg1.dkim.aefer.ai",
"valid": false
},
{
"type": "TXT",
"host": "_aefer.mail.acme.com",
"value": "aefer-verification=2kVh9wQx7LmN3pR8sT4uY6zA",
"valid": false
}
],
"verified_at": null,
"last_checked_at": null,
"expires_at": "2026-11-27T10:02:11Z",
"created_at": "2026-11-20T10:02:11Z"
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}Authorizations
Your API key, sent bare. See Authentication.
Body
application/json
Response
Domain added, with the records to add.
Whether the domain's records resolve.
pending: not all four records resolve yet. Checked every hour for 7 days, and whenever you verify it; removed if still pending after 7 days.verified: all four records resolve. Checked once a day.failing: was verified, but a record stopped resolving on two checks in a row. It is verified again once all four resolve.
Available options:
pending, verified, failing