Verify a domain
/api/v1/domains/{domain}/verifyRe-checks this domain's DNS now rather than waiting for the scheduled sweep. Safe to call repeatedly.
DNS propagation is not instant and is not uniform — a record your own resolver can see may not be visible to ours yet. If verification fails on a record you are certain is published, wait and call again before assuming the value is wrong.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domainrequired | path | string | The domain id, or the domain name itself. |
Request
/api/v1/domains/{domain}/verifycurl -X POST 'https://app.mailyte.com/api/v1/domains/yourdomain.com/verify' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/domains/yourdomain.com/verify', {
method: 'POST',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.post(
"https://app.mailyte.com/api/v1/domains/yourdomain.com/verify",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->post('https://app.mailyte.com/api/v1/domains/yourdomain.com/verify');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/domains/yourdomain.com/verify")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjectobjectstringdomain_verificationdomain_idstringsendingobjectenabledbooleanWhether this domain may send. The same value as `sending.enabled` on the domain itself.
requiresarray<string>The records in `checks` that must pass for this verdict. The same list `GET /domains/{domain}` publishes.
messagestringWhy this verdict is false, or null when it is true. One record at a time: the first failure, not every failure.
receivingobjectenabledbooleanWhether mail addressed to this domain is delivered here. A send-only domain is expected to be false, and that is not a fault.
requiresarray<string>The records in `checks` that must pass for this verdict. The same list `GET /domains/{domain}` publishes.
messagestringWhy this verdict is false, or null when it is true. One record at a time: the first failure, not every failure.
checksobjectOne entry per record, always all four, whether or not the mail server had an answer for it.
spfobjectrequired_forstringsending | receivingWhich verdict this record feeds. null means it is reported but blocks nothing.
verifiedbooleanmessagestringWhat is wrong with the record, when the mail server said. Null is "no comment", not "no problem".
dkimobjectrequired_forstringsending | receivingWhich verdict this record feeds. null means it is reported but blocks nothing.
verifiedbooleanmessagestringWhat is wrong with the record, when the mail server said. Null is "no comment", not "no problem".
mxobjectrequired_forstringsending | receivingWhich verdict this record feeds. null means it is reported but blocks nothing.
verifiedbooleanmessagestringWhat is wrong with the record, when the mail server said. Null is "no comment", not "no problem".
dmarcobjectrequired_forstringsending | receivingWhich verdict this record feeds. null means it is reported but blocks nothing.
verifiedbooleanmessagestringWhat is wrong with the record, when the mail server said. Null is "no comment", not "no problem".
advisoryarray<string>Things worth doing that block nothing -- publishing DMARC, pointing MX here. Empty on a status read, which composes none.
checked_atstringWhen the mail server last resolved these records. Null when it never has, NOT the time of this request.
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist. |
403 | The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys. |
404 | No such resource in this organization. |
422 | The request was understood but the values were not acceptable. |
429 | Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait. |
Every status, with what causes it and what to do, is on the error reference.