Domain Health (report)
/api/v1/reports/domain-healthRequest
/api/v1/reports/domain-healthcurl -X GET 'https://app.mailyte.com/api/v1/reports/domain-health' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/reports/domain-health', {
method: 'GET',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://app.mailyte.com/api/v1/reports/domain-health",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->get('https://app.mailyte.com/api/v1/reports/domain-health');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/reports/domain-health")
request = Net::HTTP::Get.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_health_reportgenerated_atstringWhen this response was computed, ISO 8601 UTC. Every report answers it, so "is this figure stale?" never depends on which report you asked.
periodobjectAlways null: this report shows your domains' DNS as it is now, so
date_rangedoes not apply.start_atstringend_atstringgranularitystringdayThe width of one
seriesbucket. Alwaysday: thegranularityquery parameter is accepted and ignored.
domainsarray<object>One row per domain in your organization, soft-deleted domains excluded.
objectstringdomain_healthdomainstringThe domain name.
dnsobjectThe domain's DNS status.
statestringverified | pending | failed | unknownverified,pending,failedorunknown.verifiedbooleanTrue only for
verified.pendingandfailedare both "not verified" to a caller deciding whether to send.
spam_scorenumberNot available yet; always null.
reputation_scorenumberAlways null today, for the same reason as
spam_score.checked_atstringSourced from the domain record's
updated_at, so it moves whenever anything about the domain changes and is not necessarily when DNS was last checked. Treat it as "as of", not as a check timestamp.
totalsobjectHow many domains are in each DNS state. They add up to
domains. These count domains, not messages.domainsintegerRows in
domains.verifiedintegerDomains whose DNS has passed.
pendingintegerDomains whose DNS check has not finished.
failedintegerDomains whose DNS check failed.
unknownintegerDomains whose DNS state is not known.
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.