If you run outbound mail, onboard customer domains, or enrich a lead list, you eventually need a straight answer: can this domain send and receive mail, and is it protected against spoofing?
This tutorial walks through a small n8n workflow that calls the Email Deliverability Auditor from the Veriline API store. One GET returns MX and provider detection, a recursive SPF check (including the RFC 7208 10-lookup limit), DMARC policy, DKIM keys on common selectors, plus a 0–100 score and a prioritised fixes list.
The workflow can be imported into n8n as-is. You only need an API.market key. A ready-to-import file is in this public gist, and the same JSON is in a collapsible block under Import the workflow.
Get a key
- Open the Veriline API store and subscribe to Email Deliverability Auditor. A free trial is enough to follow along.
- Copy your subscriber key. Send it as the
x-api-market-keyheader. Do not put the key in a public workflow, a git repo, or a screenshot.
Gateway base URL:
https://prod.api.market/api/v1/veriline/email-deliverability-auditor
Use the prod.api.market host. https://api.market/api/v1/... is not the API gateway and returns HTTP 421.
The Basic trial is limited to 1 request per second. Successful 200 responses count against the trial, including GET /health. Validation errors (4xx) do not. Pace calls at least one second apart, and skip health checks unless you are actually debugging connectivity.
The endpoint
GET /v1/audit
| Query parameter | Required | Notes |
|---|---|---|
domain |
yes | A domain (github.com), an email address, or a URL. The API normalises it. |
selectors |
no | Up to five extra DKIM selectors, comma-separated. Sixteen common selectors are always checked (google, selector1/selector2, k1/k2, s1/s2, default, mandrill, and others). The cap is 20 selectors in total. |
A missing domain returns HTTP 400 (missing_parameter). A value that is not a domain returns HTTP 422 (invalid_domain).
Try it first with curl so you can see the envelope before wiring n8n:
curl -G 'https://prod.api.market/api/v1/veriline/email-deliverability-auditor/v1/audit' \
--data-urlencode 'domain=github.com' \
--data-urlencode 'selectors=pm,cm' \
-H 'x-api-market-key: YOUR_API_KEY'
Every Veriline response uses the same envelope:
{
"success": true,
"data": {},
"error": null,
"meta": {
"request_id": "…",
"took_ms": 30,
"service": "email-auditor",
"version": "1.0.0"
}
}
On failure, success is false and error has code, message, and sometimes details.
What the audit actually returns
The following is a trimmed live response for github.com with selectors=pm,cm, captured through the API.market gateway. DNS changes, so treat the numbers as a snapshot, not a fixture.
{
"success": true,
"data": {
"domain": "github.com",
"domain_exists": true,
"score": 83,
"grade": "B",
"score_breakdown": {
"mx": 10,
"spf": 23,
"dmarc": 30,
"dkim": 20,
"extras": 0
},
"provider": {
"mailbox_provider": "Microsoft 365",
"security_gateway": null,
"sending_services": [
"Microsoft 365",
"Zendesk",
"Salesforce",
"Mailchimp",
"Marketo",
"SendGrid"
]
},
"mx": {
"records": [
{
"priority": 0,
"host": "github-com.mail.protection.outlook.com",
"provider": "Microsoft 365",
"category": "mailbox_provider"
}
],
"accepts_mail": true
},
"spf": {
"present": true,
"valid": true,
"all_qualifier": "~all",
"dns_lookups": 10,
"lookup_limit_exceeded": false,
"senders": [
"Microsoft 365",
"Zendesk",
"Salesforce",
"Mailchimp",
"Marketo",
"SendGrid"
]
},
"dmarc": {
"present": true,
"policy": "quarantine",
"subdomain_policy": "reject",
"pct": 100,
"enforced": true,
"valid": true,
"rua": ["mailto:dmarc@github.com"]
},
"dkim": {
"selectors_checked": 18,
"found": ["cm", "google", "selector1", "k1", "k2", "s1", "s2"],
"valid_keys": 7
},
"fixes": [
{
"severity": "low",
"area": "spf",
"issue": "SPF ends in ~all (softfail).",
"fix": "Once DMARC is enforced and all senders are listed, consider -all."
},
{
"severity": "low",
"area": "spf",
"issue": "SPF uses 10/10 lookups; adding one more sender may break it.",
"fix": "Trim unused includes before adding new senders."
}
]
}
}
A few fields are worth calling out for automation:
- Score and grade. The score is 0–100, summed from MX, SPF, DMARC, DKIM and extras (MTA-STS, TLS-RPT, BIMI). Grades are A (≥90), B (≥80), C (≥65), D (≥50) and F.
-
SPF lookups.
dns_lookupsis the recursive count of DNS-querying mechanisms. At 10, the record is still valid, but one moreinclude:will trip the RFC 7208 limit and become a permerror at receivers. That is why this snapshot scores 83 rather than an A, together with~allandp=quarantine. -
provider.sending_services. Inferred from SPF includes, not just MX. Useful when a secure email gateway sits in front of the mailbox. -
fixes. Already sorted critical → low, with a concrete remediation infix. This is what you should put in a Slack message or a ticket, not the raw SPF include tree. -
DKIM. Passing
selectors=pm,cmaddedcmto the default set (18 selectors checked, 7 valid keys). If a customer uses a non-standard selector, pass it here — otherwise the audit may report that no DKIM key was found even when one exists.
The full body also includes the SPF include tree, per-selector key size and CNAME, and presence flags for MTA-STS, TLS-RPT and BIMI. You do not need those in the first n8n path.
Import the workflow
Download the workflow from the public gist, or copy the JSON from the collapsible block below, then in n8n go to … → Import from File. The workflow has four steps after the manual trigger:
-
Set domain — default
github.comandselectors=pm,cm. Change these, or replace the values with expressions from a webhook, form, or spreadsheet row ({{ $json.domain }}). -
Audit email deliverability — HTTP Request
GETto/v1/audit, query parameters from the previous node, headerx-api-market-key. -
Audit succeeded? — branches on
{{ $json.success }}. -
Summarize audit — pulls
data.score,data.grade,data.provider.mailbox_provider,data.dmarc.policy,data.spf.dns_lookupsanddata.fixesinto a flat object you can send onwards. The false branch mapserror.codeanderror.message.
Before you run it, open the HTTP Request node and replace YOUR_API_KEY with your key. Better: switch Authentication to Generic Credential Type → Header Auth, name x-api-market-key, and store the key in n8n credentials so it is not saved inside the workflow.
n8n workflow JSON
{
"name": "Audit Email Deliverability (Veriline API)",
"nodes": [
{
"parameters": {},
"id": "a1e0c4d2-6b3f-4c11-9f2a-0d8e7b5c1a20",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
220,
360
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b2f1d5e3-7c40-4d22-8a3b-1e9f8c6d2b31",
"name": "domain",
"value": "github.com",
"type": "string"
},
{
"id": "c3a2e6f4-8d51-4e33-9b4c-2f0a9d7e3c42",
"name": "selectors",
"value": "pm,cm",
"type": "string"
}
]
},
"options": {}
},
"id": "d4b3f705-9e62-4f44-ac5d-301bae8f4d53",
"name": "Set domain",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
460,
360
]
},
{
"parameters": {
"method": "GET",
"url": "https://prod.api.market/api/v1/veriline/email-deliverability-auditor/v1/audit",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "domain",
"value": "={{ $json.domain }}"
},
{
"name": "selectors",
"value": "={{ $json.selectors }}"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-market-key",
"value": "YOUR_API_KEY"
}
]
},
"options": {
"timeout": 15000
}
},
"id": "e5c40816-af73-4055-bd6e-412cbf9a5e64",
"name": "Audit email deliverability",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
700,
360
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "f6d51927-b084-4166-ce7f-523dca0b6f75",
"leftValue": "={{ $json.success }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "07e62a38-c195-4277-df80-634edb1c7086",
"name": "Audit succeeded?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
940,
360
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "18f73b49-d2a6-4388-e091-745fec2d8197",
"name": "domain",
"value": "={{ $json.data.domain }}",
"type": "string"
},
{
"id": "29084c5a-e3b7-4499-f1a2-8560fd3e92a8",
"name": "score",
"value": "={{ $json.data.score }}",
"type": "number"
},
{
"id": "3a195d6b-f4c8-45aa-02b3-96710e4fa3b9",
"name": "grade",
"value": "={{ $json.data.grade }}",
"type": "string"
},
{
"id": "4b2a6e7c-05d9-46bb-13c4-a7821f50b4ca",
"name": "mailbox_provider",
"value": "={{ $json.data.provider.mailbox_provider }}",
"type": "string"
},
{
"id": "5c3b7f8d-16ea-47cc-24d5-b8932061c5db",
"name": "dmarc_policy",
"value": "={{ $json.data.dmarc.policy }}",
"type": "string"
},
{
"id": "6d4c809e-27fb-48dd-35e6-c9a43172d6ec",
"name": "spf_dns_lookups",
"value": "={{ $json.data.spf.dns_lookups }}",
"type": "number"
},
{
"id": "7e5d91af-380c-49ee-46f7-da154283e7fd",
"name": "dkim_found",
"value": "={{ $json.data.dkim.found }}",
"type": "array"
},
{
"id": "8f6ea2b0-491d-4aff-57a8-eb265394f80e",
"name": "fixes",
"value": "={{ $json.data.fixes }}",
"type": "array"
}
]
},
"options": {}
},
"id": "907fb3c1-5a2e-4b00-68b9-fc3764a5091f",
"name": "Summarize audit",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1180,
260
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "a180c4d2-6b3f-4c11-79ca-0d4875b61a20",
"name": "success",
"value": "={{ $json.success }}",
"type": "boolean"
},
{
"id": "b291d5e3-7c40-4d22-8adb-1e5986c72b31",
"name": "error_code",
"value": "={{ $json.error.code }}",
"type": "string"
},
{
"id": "c3a2e6f4-8d51-4e33-9bec-2f6a97d83c42",
"name": "error_message",
"value": "={{ $json.error.message }}",
"type": "string"
}
]
},
"options": {}
},
"id": "d4b3f705-9e62-4f44-acfd-307ba8e94d53",
"name": "Handle error",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1180,
480
]
}
],
"connections": {
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "Set domain",
"type": "main",
"index": 0
}
]
]
},
"Set domain": {
"main": [
[
{
"node": "Audit email deliverability",
"type": "main",
"index": 0
}
]
]
},
"Audit email deliverability": {
"main": [
[
{
"node": "Audit succeeded?",
"type": "main",
"index": 0
}
]
]
},
"Audit succeeded?": {
"main": [
[
{
"node": "Summarize audit",
"type": "main",
"index": 0
}
],
[
{
"node": "Handle error",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "e5c40816-af73-4055-bd6e-412cbf9a5e64",
"meta": {
"templateCredsSetupInfo": {},
"instanceId": ""
},
"id": "veriline-email-deliverability-audit",
"tags": []
}
A minimal HTTP Request node looks like this if you would rather build it by hand:
{
"parameters": {
"method": "GET",
"url": "https://prod.api.market/api/v1/veriline/email-deliverability-auditor/v1/audit",
"sendQuery": true,
"queryParameters": {
"parameters": [
{ "name": "domain", "value": "={{ $json.domain }}" },
{ "name": "selectors", "value": "={{ $json.selectors }}" }
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{ "name": "x-api-market-key", "value": "YOUR_API_KEY" }
]
},
"options": { "timeout": 15000 }
},
"name": "Audit email deliverability",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
}
Set the node's timeout to at least 15 seconds. Recursive SPF usually finishes in a few hundred milliseconds, but DNS-over-HTTPS can be slower, and the gateway adds its own hop.
Hooking it into a real flow
Once the summary node looks right, replace the manual trigger:
-
Webhook or form — a teammate pastes a domain, you return
score,gradeandfixes. - Spreadsheet or CRM list — loop domains with a Wait node of 1 second between items so you stay under the Basic 1 request/second cap.
-
Alerting — if
gradeis D or F, or any fix hasseverityofcriticalorhigh, post to Slack or open a ticket. A domain with no SPF orp=noneis a different class of problem from a missing BIMI record.
Branch on success first. A 422 is a bad input, not a failing domain. A 502/504 (dns_upstream_error) means the resolver failed; retry once, then surface it.
The same HTTP call works outside n8n. In Node 18+:
const url = new URL(
"https://prod.api.market/api/v1/veriline/email-deliverability-auditor/v1/audit",
);
url.searchParams.set("domain", "github.com");
url.searchParams.set("selectors", "pm,cm");
const res = await fetch(url, {
headers: { "x-api-market-key": process.env.API_MARKET_KEY },
});
const body = await res.json();
if (!body.success) {
throw new Error(`${res.status} ${body.error?.code}: ${body.error?.message}`);
}
console.log(body.data.score, body.data.grade, body.data.fixes);
Notes from the Veriline API team
We built this API for onboarding and enrichment workflows, not as a replacement for a mailbox-provider admin console. The audit is live DNS-over-HTTPS on every call, so results follow the public records, not a cache we control.
If you want the same audit from an MCP client, the @verilineapi/mcp package exposes audit_email_deliverability with the same domain and selectors arguments. For HTTP, start at the product page.
Questions about the API: verilineapi@proton.me.
Top comments (0)