Add a Domain
Add and configure a sending domain in your Mail.Land workspace
Before sending email through MailLand, you need to add and verify at least one sending domain. This proves you own the domain and authorizes MailLand to send on your behalf.
Add a Domain
POST https://api.mail.land/v1/domainscurl -X POST https://api.mail.land/v1/domains \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"domain": "yourdomain.com"
}'Response
Status: 201 Created
{
"id": "k3v9x2m8q1w7z4",
"domain": "yourdomain.com",
"verificationStatus": "pending",
"spfStatus": "pending",
"dkimStatus": "pending",
"dmarcStatus": "pending",
"isFullyVerified": false,
"trackingSubdomain": "track",
"useCustomTracking": false,
"bounceSubdomain": "bounce",
"useCustomBounce": true,
"inboundEnabled": false,
"inboundSubdomain": null,
"mxVerified": false,
"healthStatus": "unknown",
"createdAt": "2026-02-17T10:00:00Z",
"updatedAt": "2026-02-17T10:00:00Z"
}| Field | Type | Description |
|---|---|---|
id | string | Domain public ID |
domain | string | The domain name |
verificationStatus | enum | pending, verified, or failed |
spfStatus / dkimStatus / dmarcStatus | enum | pending, valid, or invalid per record |
isFullyVerified | boolean | Ownership verified AND SPF, DKIM and DMARC all valid, required to send |
trackingSubdomain / bounceSubdomain | string | Subdomains used for tracking/bounce, whether or not the custom domain is enabled |
useCustomTracking / useCustomBounce | boolean | Whether the custom tracking/bounce domain is turned on |
inboundEnabled | boolean | Whether inbound email receiving is on for this domain |
inboundSubdomain | string | null | Subdomain for the inbound MX record; null means the domain root |
mxVerified | boolean | Whether the inbound MX record is verified |
healthStatus | enum | unknown, healthy, warning, or critical |
createdAt | datetime | When the domain was added |
There is no verification token: adding a domain creates the record and generates its DKIM key automatically (no token step).
After adding a domain, you need to configure DNS records and verify ownership before you can send email. See DNS Setup for the required records.
Setup Flow
Add the domain
Call POST /v1/domains with your domain name. MailLand creates the domain record and generates its DKIM key.
Get DNS instructions
Call GET /v1/domains/{id}/dns-instructions to retrieve the exact DNS records you need to create. See DNS Setup.
Configure DNS records
Add the SPF, DKIM and DMARC records (plus the optional bounce/tracking CNAMEs if enabled) to your DNS provider.
Verify the domain
Call POST /v1/domains/{id}/verify to trigger verification. MailLand checks all DNS records and updates the domain status. See Verification.
List Domains
GET https://api.mail.land/v1/domainscurl https://api.mail.land/v1/domains \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."{
"items": [
{
"id": "k3v9x2m8q1w7z4",
"domain": "yourdomain.com",
"verificationStatus": "verified",
"spfStatus": "valid",
"dkimStatus": "valid",
"dmarcStatus": "valid",
"isFullyVerified": true,
"trackingSubdomain": "track",
"useCustomTracking": false,
"bounceSubdomain": "bounce",
"useCustomBounce": false,
"inboundEnabled": false,
"inboundSubdomain": null,
"mxVerified": false,
"healthStatus": "healthy",
"createdAt": "2026-02-17T10:00:00Z",
"updatedAt": "2026-02-17T10:15:00Z"
}
],
"nextCursor": "eyJ2IjoxLCJzIjoiY3JlYXRlZGF0OmRlc2MiLCJrIjoi...",
"hasMore": true
}Get a Domain
GET https://api.mail.land/v1/domains/{id}Returns the full domain details including verification status and all subdomains.
curl https://api.mail.land/v1/domains/k3v9x2m8q1w7z4 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Update Domain Settings
Customize tracking and bounce subdomains, and toggle inbound. Other settings fields: useCustomTracking, useCustomBounce, inboundEnabled, inboundSubdomain. These labels only take effect once the corresponding custom flag is on and the record is verified. Turning useCustomBounce on clears the bounce record's verification, so you must verify its CNAME again:
PATCH https://api.mail.land/v1/domains/{id}/settingscurl -X PATCH https://api.mail.land/v1/domains/k3v9x2m8q1w7z4/settings \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"trackingSubdomain": "links",
"bounceSubdomain": "returns"
}'Changing subdomains requires updating your DNS records and re-verifying the domain.
Delete a Domain
DELETE https://api.mail.land/v1/domains/{id}Returns 204 No Content on success. Deleting a domain:
- Revokes all DKIM keys associated with the domain
- Stops all email sending from this domain
- Removes tracking and bounce routing
curl -X DELETE https://api.mail.land/v1/domains/k3v9x2m8q1w7z4 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Deletion is permanent. Any API credentials scoped to this domain will no longer be able to send email. Active campaigns or automations using this domain will fail.
Error Responses
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_FAILED | Invalid domain name format |
400 | INVALID_REQUEST | Domain already added (to this workspace or another) |
404 | DOMAIN_NOT_FOUND | Domain ID does not exist |
403 | PLAN_LIMIT_REACHED | Maximum domains for your plan reached |
400 | DOMAIN_SUBDOMAIN_EMPTY | PATCH settings: a subdomain field was sent empty |
400 | DOMAIN_SUBDOMAIN_CONFLICT | PATCH settings: the requested subdomain is already used by another record on this domain |
MailLand limits the number of sending domains by plan, and the limit differs per plan (some plans are unlimited). Once you reach it, adding a domain returns 403 PLAN_LIMIT_REACHED. See your current plan under Billing.
Next Steps
- DNS Setup: configure SPF, DKIM, and DMARC records
- Verification: verify domain ownership
- DKIM Key Rotation: manage DKIM signing keys