Domains
The domain you send from. Adding acme.dev sets up two subdomains: mail.acme.dev for transactional email and updates.acme.dev for marketing, so a marketing problem never hurts your password resets.
Add the returned DNS records at your DNS provider, or use the one-click setup link when the provider supports Domain Connect. Mailpark re-checks DNS on its own; call verify to check now.
type Domain = {
id: string; // the root domain, e.g. "acme.dev"
domain: string;
status: "pending" | "partially_verified" | "verified" | "failed";
subdomains: { transactional: string; marketing: string };
records: {
id: string;
purpose: "DKIM" | "SPF" | "MX" | "DMARC" | "Tracking";
lane: "transactional" | "marketing" | "both";
type: "CNAME" | "TXT" | "MX";
name: string; value: string; priority?: number;
status: "pending" | "verified" | "failed";
note: string | null;
}[];
click_tracking: { host: string; status: "not_set_up" | "issuing_certificate" | "active" | "standby" | "failed" };
last_checked_at: string | null; next_check_at: string | null; created_at: string;
};Add a domain
/v1/domainsSets up mail.<domain> and updates.<domain> and returns the DNS records to add.
domains:writeBody
domainstringrequiredThe root domain, e.g.
acme.dev.
curl -X POST https://api.mailpark.io/v1/domains \
-H "Authorization: Bearer $MAILPARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "acme.dev"
}'{
"id": "acme.dev",
"domain": "acme.dev",
"status": "pending",
"subdomains": {
"transactional": "mail.acme.dev",
"marketing": "updates.acme.dev"
},
"records": [
{
"id": "dkim_1",
"purpose": "DKIM",
"lane": "both",
"type": "CNAME",
"name": "mp1._domainkey.acme.dev",
"value": "mp1.dkim.mailpark.io",
"status": "pending",
"note": null
},
{
"id": "spf_mail",
"purpose": "SPF",
"lane": "transactional",
"type": "TXT",
"name": "mail.acme.dev",
"value": "v=spf1 include:amazonses.com ~all",
"status": "pending",
"note": null
},
{
"id": "mx_mail",
"purpose": "MX",
"lane": "transactional",
"type": "MX",
"name": "mail.acme.dev",
"value": "feedback-smtp.us-east-1.amazonses.com",
"priority": 10,
"status": "pending",
"note": null
},
{
"id": "dmarc",
"purpose": "DMARC",
"lane": "both",
"type": "TXT",
"name": "_dmarc.acme.dev",
"value": "v=DMARC1; p=none;",
"status": "pending",
"note": "Skip if you already have a DMARC record."
}
],
"click_tracking": {
"host": "links.updates.acme.dev",
"status": "not_set_up"
},
"last_checked_at": null,
"next_check_at": "2026-10-22T10:07:11Z",
"created_at": "2026-10-22T10:02:11Z"
}curl https://api.mailpark.io/v1/domains \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"data": [
{
"id": "acme.dev",
"domain": "acme.dev",
"status": "pending",
"subdomains": {
"transactional": "mail.acme.dev",
"marketing": "updates.acme.dev"
},
"records": [
{
"id": "dkim_1",
"purpose": "DKIM",
"lane": "both",
"type": "CNAME",
"name": "mp1._domainkey.acme.dev",
"value": "mp1.dkim.mailpark.io",
"status": "pending",
"note": null
},
{
"id": "spf_mail",
"purpose": "SPF",
"lane": "transactional",
"type": "TXT",
"name": "mail.acme.dev",
"value": "v=spf1 include:amazonses.com ~all",
"status": "pending",
"note": null
},
{
"id": "mx_mail",
"purpose": "MX",
"lane": "transactional",
"type": "MX",
"name": "mail.acme.dev",
"value": "feedback-smtp.us-east-1.amazonses.com",
"priority": 10,
"status": "pending",
"note": null
},
{
"id": "dmarc",
"purpose": "DMARC",
"lane": "both",
"type": "TXT",
"name": "_dmarc.acme.dev",
"value": "v=DMARC1; p=none;",
"status": "pending",
"note": "Skip if you already have a DMARC record."
}
],
"click_tracking": {
"host": "links.updates.acme.dev",
"status": "not_set_up"
},
"last_checked_at": null,
"next_check_at": "2026-10-22T10:07:11Z",
"created_at": "2026-10-22T10:02:11Z"
}
],
"next_cursor": null
}Get a domain
/v1/domains/{id}The domain with each DNS record's status and click tracking.
Path parameters
idstringrequiredThe root domain, e.g.
acme.dev.
curl https://api.mailpark.io/v1/domains/acme.dev \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"id": "acme.dev",
"domain": "acme.dev",
"status": "pending",
"subdomains": {
"transactional": "mail.acme.dev",
"marketing": "updates.acme.dev"
},
"records": [
{
"id": "dkim_1",
"purpose": "DKIM",
"lane": "both",
"type": "CNAME",
"name": "mp1._domainkey.acme.dev",
"value": "mp1.dkim.mailpark.io",
"status": "pending",
"note": null
},
{
"id": "spf_mail",
"purpose": "SPF",
"lane": "transactional",
"type": "TXT",
"name": "mail.acme.dev",
"value": "v=spf1 include:amazonses.com ~all",
"status": "pending",
"note": null
},
{
"id": "mx_mail",
"purpose": "MX",
"lane": "transactional",
"type": "MX",
"name": "mail.acme.dev",
"value": "feedback-smtp.us-east-1.amazonses.com",
"priority": 10,
"status": "pending",
"note": null
},
{
"id": "dmarc",
"purpose": "DMARC",
"lane": "both",
"type": "TXT",
"name": "_dmarc.acme.dev",
"value": "v=DMARC1; p=none;",
"status": "pending",
"note": "Skip if you already have a DMARC record."
}
],
"click_tracking": {
"host": "links.updates.acme.dev",
"status": "not_set_up"
},
"last_checked_at": null,
"next_check_at": "2026-10-22T10:07:11Z",
"created_at": "2026-10-22T10:02:11Z"
}Check DNS now
/v1/domains/{id}/verifyRe-checks every record straight away instead of waiting for the next automatic check.
Path parameters
idstringrequiredThe root domain.
curl -X POST https://api.mailpark.io/v1/domains/acme.dev/verify \
-H "Authorization: Bearer $MAILPARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "acme.dev",
"domain": "acme.dev",
"status": "partially_verified",
"subdomains": {
"transactional": "mail.acme.dev",
"marketing": "updates.acme.dev"
},
"records": [
{
"id": "dkim_1",
"purpose": "DKIM",
"lane": "both",
"type": "CNAME",
"name": "mp1._domainkey.acme.dev",
"value": "mp1.dkim.mailpark.io",
"status": "pending",
"note": null
},
{
"id": "spf_mail",
"purpose": "SPF",
"lane": "transactional",
"type": "TXT",
"name": "mail.acme.dev",
"value": "v=spf1 include:amazonses.com ~all",
"status": "pending",
"note": null
},
{
"id": "mx_mail",
"purpose": "MX",
"lane": "transactional",
"type": "MX",
"name": "mail.acme.dev",
"value": "feedback-smtp.us-east-1.amazonses.com",
"priority": 10,
"status": "pending",
"note": null
},
{
"id": "dmarc",
"purpose": "DMARC",
"lane": "both",
"type": "TXT",
"name": "_dmarc.acme.dev",
"value": "v=DMARC1; p=none;",
"status": "pending",
"note": "Skip if you already have a DMARC record."
}
],
"click_tracking": {
"host": "links.updates.acme.dev",
"status": "not_set_up"
},
"last_checked_at": "2026-10-22T10:02:11Z",
"next_check_at": "2026-10-22T10:07:11Z",
"created_at": "2026-10-22T10:02:11Z"
}Get the one-click setup link
/v1/domains/{id}/connectWhen the domain's DNS provider supports Domain Connect, a link where the founder signs in and approves every record at once. url is null when unsupported.
domains:writePath parameters
idstringrequiredThe root domain.
curl https://api.mailpark.io/v1/domains/acme.dev/connect \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"supported": true,
"provider": "Cloudflare",
"url": "https://dash.cloudflare.com/domainconnect/v2/domainTemplates/providers/mailpark.io/…",
"groups": [
"sending",
"tracking"
],
"message": "Open the link, sign in to Cloudflare and approve."
}Remove a domain
/v1/domains/{id}Stops sending from it. Refused while it's the only verified domain on a live account.
domains:writePath parameters
idstringrequiredThe root domain.
Errors
curl -X DELETE https://api.mailpark.io/v1/domains/acme.dev \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"deleted": true,
"id": "acme.dev",
"next_steps": []
}