Update domain
Update configuration settings for a domain.
API token in Api-Token header
Domain ID
1Domain details
Indicates the compliance verification status of the domain.
The domain must reach compliant status before you can send emails
in production.
demo- A demo domain provided by Mailtrap. Can only send emails to the account owner.demo_exhausted- A demo domain that has used up its sending allowance. Cannot send emails.unverified_dns- Domain DNS records have not been verified yet. Open your domain on the Domains page and follow the Sending Domain Setup guide.missing_company_info- Account is missing required company information. Go to Company Information and fill in the required details.under_review- Domain is undergoing automatic compliance review. No action needed — typically completes within 2 minutes.awaiting_questionnaire- Automatic review required additional information. Open your domain on the Domains page and fill in the compliance questionnaire.awaiting_card_verification- Compliance questionnaire was submitted but credit card identity verification is still needed. Open your domain on the Domains page and enter card details. The charged amount is refunded immediately and the card is not stored.non_compliant- Domain did not pass compliance checks. Sending is not allowed. Contact Mailtrap Support for details and next steps.compliant- Domain has passed all compliance checks and is ready to send emails.suspended- Domain sending has been suspended. Contact Mailtrap Support to resolve the issue.
2024-12-26T09:40:44.161ZWhen enabled, recipients can opt out of open and click tracking via a link in tracked emails. Requires open or click tracking to be enabled.
Whether inbound email is enabled for this domain. When enabled, an
MX record (key: inbound_mx) is added to dns_records for inbound
mail; see inbound_verified.
Whether the domain's inbound MX records have been verified. Inbound
mail is only accepted once this is true.
Returns unauthorized error message. Check your credentials.
Returns forbidden error message. Check your permissions.
Resource not found
Validation errors
curl -X PATCH https://mailtrap.io/api/domains/{domain_id} \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"domain": {
"open_tracking_enabled": true,
"click_tracking_enabled": true,
"tracking_opt_out_enabled": true,
"auto_unsubscribe_link_enabled": false,
"inbound_enabled": true
}
}'
{
"id": 435,
"domain_name": "mailtrap.io",
"demo": false,
"compliance_status": "compliant",
"dns_verified": true,
"dns_verified_at": "2024-12-26T09:40:44.161Z",
"dns_records": [
{
"key": "verification",
"domain": "ve6wza2rbpe60x7z.mailtrap.io",
"type": "CNAME",
"value": "smtp.mailtrap.live",
"status": "pass",
"name": "ve6wza2rbpe60x7z"
},
{
"key": "dkim1",
"domain": "rwmt1._domainkey.mailtrap.io",
"type": "CNAME",
"value": "rwmt1.dkim.smtp.mailtrap.live",
"status": "pass",
"name": "rwmt1._domainkey"
},
{
"key": "dkim2",
"domain": "rwmt2._domainkey.mailtrap.io",
"type": "CNAME",
"value": "rwmt2.dkim.smtp.mailtrap.live",
"status": "pass",
"name": "rwmt2._domainkey"
},
{
"key": "dmarc",
"domain": "_dmarc.mailtrap.io",
"type": "TXT",
"value": "v=DMARC1; p=none; rua=mailto:dmarc@smtp.mailtrap.live; ruf=mailto:dmarc@smtp.mailtrap.live; rf=afrf; pct=100",
"status": "pass",
"name": "_dmarc"
},
{
"key": "link_verification",
"domain": "mt-link.mailtrap.io",
"type": "CNAME",
"value": "t.mailtrap.live",
"status": "pass",
"name": "mt-link"
},
{
"key": "inbound_mx",
"domain": "mailtrap.io",
"type": "MX",
"value": "inbound-mailtrap.io",
"status": "pass",
"name": "@"
}
],
"open_tracking_enabled": true,
"click_tracking_enabled": true,
"tracking_opt_out_enabled": false,
"auto_unsubscribe_link_enabled": true,
"custom_domain_tracking_enabled": true,
"health_alerts_enabled": true,
"critical_alerts_enabled": true,
"alert_recipient_email": "john.doe@mailtrap.io",
"inbound_enabled": true,
"inbound_verified": true,
"permissions": {
"can_read": true,
"can_update": true,
"can_destroy": true
}
}Last updated
Was this helpful?

