API Reference
Verify a domain
POST /domains/:id/verify — re-check DNS and update the domain status.
POST
/domains/:id/verifyRe-checks the domain’s DNS and updates the domain’s status (and every record’s status) to verified, failed, or still pending. Call this after publishing your DNS records, or any time you want to refresh verification state. Requires a key with full access.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.domains.verify('d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e');
console.log({ data, error });Response — a slim acknowledgement. Fetch the domain with `GET /domains/:id` to read the refreshed statuses:
{
"object": "domain",
"id": "d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e"
}DNS can take time to propagate. If the domain is still
pending, wait a bit and call verify again.Errors: not_found if the domain does not exist or is not yours, invalid_access if the key lacks full access. See Errors.