List domains
Get all domains and their verification status
get
Authorizations
Api-TokenstringRequired
API token in Api-Token header
Responses
200
List of domains
application/json
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
get/api/domains
curl -X GET https://mailtrap.io/api/domains \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"data": [
{
"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?

