Verify Domain
curl --request POST \
--url https://app.pixie.ai/api/email/domains/{id}/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pixie.ai/api/email/domains/{id}/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pixie.ai/api/email/domains/{id}/verify', 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://app.pixie.ai/api/email/domains/{id}/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 <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.pixie.ai/api/email/domains/{id}/verify"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.pixie.ai/api/email/domains/{id}/verify")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pixie.ai/api/email/domains/{id}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"domain": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"status": "pending"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Sending Domains
Verify Domain
Re-run or poll DNS verification for a custom sending domain.
POST
/
api
/
email
/
domains
/
{id}
/
verify
Verify Domain
curl --request POST \
--url https://app.pixie.ai/api/email/domains/{id}/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pixie.ai/api/email/domains/{id}/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pixie.ai/api/email/domains/{id}/verify', 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://app.pixie.ai/api/email/domains/{id}/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 <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.pixie.ai/api/email/domains/{id}/verify"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.pixie.ai/api/email/domains/{id}/verify")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pixie.ai/api/email/domains/{id}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"domain": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"status": "pending"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}CLI:
pixie email domain verify --id <id>
pixie email domain verify --id <id> --poll <poll>
Overview
POST /api/email/domains/{id}/verify (verifyEmailDomain) has two modes:
- Trigger mode (default). Pre-marks the domain
verifying, kicks off an async DNS check, reads the live status back, and persists it along with the latest expected DNS records. If the post-call status is stillverifying, thedomain-verify-pollerbackground task is scheduled (idempotency keyed per domain) so the DB converges even if the user closes the page. - Poll mode (
?poll=true). Skip the verify trigger and just read the live status. Use this on every polling tick — re-triggering verification on each tick restarts the async DNS checker and can cause visible flicker betweenverifying,failed, and back toverifying.
AI agent notes
DNS dependency. Verification only succeeds after the required DKIM/SPF/DMARC records resolve on the domain. Creating the domain via
createEmailDomain auto-syncs these records when Pixie can manage the zone; otherwise the user must add the records manually at their DNS provider before calling this endpoint.Polling recipe. Use verifyEmailDomain (no flag) once to start the verification, then hit it with ?poll=true every 30–60 seconds until status is verified or failed. The background domain-verify-poller will keep re-checking on exponential backoff (10m, 20m, 40m, 80m, 160m, 320m) for up to 12 hours even without client-side polling.Idempotency is enforced. Repeated trigger calls collapse into the original poller chain via a per-domain idempotency key.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Email domain (email_domains.id) UUID.
Minimum string length:
1Query Parameters
If true, skip triggering a verification check and only read the current live status. Use this on every polling tick so the async DNS checker is not restarted repeatedly, which can cause flicker verifying → failed → verifying.
Available options:
true, false Response
Domain verification state after this call. status is verified on success, verifying if DNS is still propagating, or failed if the verification service rejected the records. dns_records is always refreshed with the live expected values.
Verified email domain row.
Show child attributes
Show child attributes
Was this page helpful?