Domains
Add sending domains, read their DNS records and verify them.
/v1/domains/{domainId}/dmarc/summaryAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
The domain's public id.
Query Parameters
1 to the plan's retention (30 / 90 / 180); default 30, or the retention when shorter.
^-?(?:0|[1-9]\d*)$int32Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/dmarc/summary"{ "domainId": "string", "domain": "string", "days": 0, "retentionDays": 0, "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "reports": 0, "messages": 0, "dmarcPass": 0, "spfAligned": 0, "dkimAligned": 0, "dmarcPassRate": null, "dispositions": { "none": 0, "quarantine": 0, "reject": 0, "other": 0 }, "latestReportReceivedAt": null}/v1/domains/{domainId}/dmarc/sourcesAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
The domain's public id.
Query Parameters
As for the summary.
^-?(?:0|[1-9]\d*)$int321 to 500, default 100.
^-?(?:0|[1-9]\d*)$int32Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/dmarc/sources"{ "domainId": "string", "domain": "string", "days": 0, "retentionDays": 0, "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "sources": [ { "ip": "string", "messages": 0, "dmarcPass": 0, "spfAligned": 0, "dkimAligned": 0, "dispositions": { "none": 0, "quarantine": 0, "reject": 0, "other": 0 }, "reports": 0, "lastSeen": "2019-08-24T14:15:22Z" } ], "truncated": true}/v1/domainsAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Query Parameters
^-?(?:0|[1-9]\d*)$int3250Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains"{ "items": [ { "id": "string", "domain": "string", "verificationStatus": "pending", "spfStatus": "pending", "dkimStatus": "pending", "dmarcStatus": "pending", "verifiedAt": null, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "spfVerifiedAt": null, "dkimVerifiedAt": null, "dmarcVerifiedAt": null, "trackingSubdomain": "string", "trackingVerified": true, "trackingVerifiedAt": null, "useCustomTracking": true, "marketingOpenTrackingEnabled": null, "transactionalOpenTrackingEnabled": null, "bounceSubdomain": "string", "bounceVerified": true, "bounceVerifiedAt": null, "useCustomBounce": true, "inboundEnabled": true, "inboundSubdomain": null, "mxVerified": true, "mxVerifiedAt": null, "lastDnsCheckAt": null, "isFullyVerified": true, "healthStatus": "unknown", "lastHealthCheckAt": null, "lastHealthyAt": null, "lastStatusChangedAt": null, "dnsFailureCount": 0, "healthIssues": [ { "code": "string", "message": "string", "severity": "string", "record": null, "details": null } ] } ], "nextCursor": null, "hasMore": true}/v1/domainsAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Request Body
application/json
Cancellation token
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/domains"{ "id": "string", "domain": "string", "verificationStatus": "pending", "spfStatus": "pending", "dkimStatus": "pending", "dmarcStatus": "pending", "verifiedAt": null, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "spfVerifiedAt": null, "dkimVerifiedAt": null, "dmarcVerifiedAt": null, "trackingSubdomain": "string", "trackingVerified": true, "trackingVerifiedAt": null, "useCustomTracking": true, "marketingOpenTrackingEnabled": null, "transactionalOpenTrackingEnabled": null, "bounceSubdomain": "string", "bounceVerified": true, "bounceVerifiedAt": null, "useCustomBounce": true, "inboundEnabled": true, "inboundSubdomain": null, "mxVerified": true, "mxVerifiedAt": null, "lastDnsCheckAt": null, "isFullyVerified": true, "healthStatus": "unknown", "lastHealthCheckAt": null, "lastHealthyAt": null, "lastStatusChangedAt": null, "dnsFailureCount": 0, "healthIssues": [ { "code": "string", "message": "string", "severity": "string", "record": null, "details": null } ]}/v1/domains/{id}Authorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string"{ "id": "string", "domain": "string", "verificationStatus": "pending", "spfStatus": "pending", "dkimStatus": "pending", "dmarcStatus": "pending", "verifiedAt": null, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "spfVerifiedAt": null, "dkimVerifiedAt": null, "dmarcVerifiedAt": null, "trackingSubdomain": "string", "trackingVerified": true, "trackingVerifiedAt": null, "useCustomTracking": true, "marketingOpenTrackingEnabled": null, "transactionalOpenTrackingEnabled": null, "bounceSubdomain": "string", "bounceVerified": true, "bounceVerifiedAt": null, "useCustomBounce": true, "inboundEnabled": true, "inboundSubdomain": null, "mxVerified": true, "mxVerifiedAt": null, "lastDnsCheckAt": null, "isFullyVerified": true, "healthStatus": "unknown", "lastHealthCheckAt": null, "lastHealthyAt": null, "lastStatusChangedAt": null, "dnsFailureCount": 0, "healthIssues": [ { "code": "string", "message": "string", "severity": "string", "record": null, "details": null } ]}/v1/domains/{id}Authorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID to delete
Response Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/domains/string"/v1/domains/{id}/verifyAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID to verify
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/domains/string/verify"{ "domainId": "string", "domain": "string", "isVerified": true, "spfStatus": "pending", "dkimStatus": "pending", "dmarcStatus": "pending", "verifiedAt": null, "message": "string", "dnsRecords": { "spfRecord": "string", "dkimSelector": "string", "dkimRecord": "string", "dmarcRecord": "string" }, "spfErrorMessage": null, "dkimErrorMessage": null, "dmarcErrorMessage": null, "trackingVerified": true, "trackingVerifiedAt": null, "trackingErrorMessage": null, "bounceVerified": true, "bounceVerifiedAt": null, "bounceErrorMessage": null, "mxVerified": true, "mxVerifiedAt": null, "mxErrorMessage": null, "lastDnsCheckAt": null}/v1/domains/{id}/dns-recordsAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/dns-records"{ "domain": "string", "spfRecord": { "recordType": "string", "hostName": "string", "value": "string", "status": "pending", "instructions": "string" }, "dkimRecord": null, "noActiveDkimKey": true, "dmarcRecord": { "recordType": "string", "hostName": "string", "value": "string", "status": "pending", "instructions": "string" }, "trackingRecord": null, "bounceRecords": null, "notes": [ "string" ]}/v1/domains/{id}/dns-instructionsAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/dns-instructions"{ "domain": "string", "spfRecord": { "recordType": "string", "hostName": "string", "value": "string", "status": "pending", "instructions": "string" }, "dkimRecord": null, "noActiveDkimKey": true, "dmarcRecord": { "recordType": "string", "hostName": "string", "value": "string", "status": "pending", "instructions": "string" }, "trackingRecord": null, "bounceRecords": null, "notes": [ "string" ]}/v1/domains/{id}/deletion-impactAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/deletion-impact"{ "trackingHosts": [ "string" ], "clicksAndOpensWorkUntil": null, "unsubscribeWorksUntilAccountErasure": true, "certificateRenewsWhileCnamePointsHere": true, "hostsReservedUntilAccountErasure": true}/v1/domains/{id}/settingsAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Request Body
application/json
Cancellation token
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/domains/string/settings"{ "id": "string", "domain": "string", "verificationStatus": "pending", "spfStatus": "pending", "dkimStatus": "pending", "dmarcStatus": "pending", "verifiedAt": null, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "spfVerifiedAt": null, "dkimVerifiedAt": null, "dmarcVerifiedAt": null, "trackingSubdomain": "string", "trackingVerified": true, "trackingVerifiedAt": null, "useCustomTracking": true, "marketingOpenTrackingEnabled": null, "transactionalOpenTrackingEnabled": null, "bounceSubdomain": "string", "bounceVerified": true, "bounceVerifiedAt": null, "useCustomBounce": true, "inboundEnabled": true, "inboundSubdomain": null, "mxVerified": true, "mxVerifiedAt": null, "lastDnsCheckAt": null, "isFullyVerified": true, "healthStatus": "unknown", "lastHealthCheckAt": null, "lastHealthyAt": null, "lastStatusChangedAt": null, "dnsFailureCount": 0, "healthIssues": [ { "code": "string", "message": "string", "severity": "string", "record": null, "details": null } ]}/v1/domains/{id}/dkim/generateAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/domains/string/dkim/generate"{ "key": { "id": "string", "domainId": "string", "domain": "string", "selector": "string", "publicKey": "string", "keyType": "rsa", "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "rotatedAt": null, "dnsRecordValue": "string", "dnsRecordHost": "string" }, "dnsInstructions": { "recordType": "string", "hostName": "string", "value": "string", "instructions": "string" }, "message": "string"}/v1/domains/{id}/dkimAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/dkim"[ { "id": "string", "domainId": "string", "domain": "string", "selector": "string", "publicKey": "string", "keyType": "rsa", "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "rotatedAt": null, "dnsRecordValue": "string", "dnsRecordHost": "string" }]/v1/domains/{id}/dkim/{keyId}/rotateAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID (PublicId)
DKIM key ID (PublicId) to rotate
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/domains/string/dkim/string/rotate"{ "key": { "id": "string", "domainId": "string", "domain": "string", "selector": "string", "publicKey": "string", "keyType": "rsa", "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "rotatedAt": null, "dnsRecordValue": "string", "dnsRecordHost": "string" }, "dnsInstructions": { "recordType": "string", "hostName": "string", "value": "string", "instructions": "string" }, "message": "string"}/v1/domains/{id}/dkim/{keyId}Authorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID (PublicId)
DKIM key ID (PublicId) to deactivate
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/domains/string/dkim/string"/v1/domains/{id}/health-checkAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/domains/string/health-check"{ "domainName": "string", "status": "unknown", "previousStatus": "unknown", "issues": [ { "code": "string", "message": "string", "severity": "string", "record": null, "details": null } ], "statusChanged": true, "checkedAt": "2019-08-24T14:15:22Z", "observationId": { "value": "a860a344-d7b2-406e-828e-8d442f23f344" }, "spf": null, "dkim": null, "dmarc": null, "mx": null}/v1/domains/{id}/health-historyAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Domain ID
Query Parameters
Start date (defaults to 30 days ago)
date-timeEnd date (defaults to now)
date-timeResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/domains/string/health-history"[ { "domainName": "string", "prevStatus": "string", "newStatus": "string", "issues": [ "string" ], "reason": "string", "checkedAt": "2019-08-24T14:15:22Z" }]