Get the list of domains. Can be filtered by state or authority. Sorting is optional. The list is paginated and limited to 1000 items per page.
{- "total_count": 1,
- "items": [
- {
- "created_at": "Mon, 02 Jan 2006 15:04:05 MST",
- "id": "1",
- "name": "example.com",
- "state": "unverified",
- "type": "custom",
- "web_prefix": "email",
- "disabled": {
- "code": "blacklisted",
- "note": "for debugging",
- "permanently": true,
- "reason": "bad customer"
}
}
]
}
Creates a domain for sending emails
A 200 response
A 401 response
{- "message": "Domain DNS records have been created",
- "domain": {
- "created_at": "Thu, 13 Oct 2011 18:02:00 GMT",
- "id": "123456789012345678901234",
- "name": "example.com",
- "require_tls": true,
- "smtp_login": "postmaster@example.com",
- "spam_action": "disabled",
- "state": "active",
- "type": "sandbox",
- "use_automatic_sender_security": true,
- "web_prefix": "email",
- "web_scheme": "http"
}, - "receiving_dns_records": [
- {
- "cached": [ ],
- "name": "example.com",
- "priority": "10",
- "record_type": "MX",
- "valid": "unknown"
}
], - "sending_dns_records": [
- {
- "cached": [
- "mxa.example.com",
- "mxb.example.com"
], - "name": "example.com",
- "priority": "10",
- "record_type": "A",
- "valid": "valid",
- "value": "1.2.3.4"
}
]
}
Fetches json representation of a domain that includes details about the domain's state and settings.
A 200 response
required | github.com-mailgun-domains-client-golang-Domain (object) or null Domain details |
Array of github.com-mailgun-domains-client-golang-Record (object) or null List of DNS records required for receiving emails | |
Array of github.com-mailgun-domains-client-golang-Record (object) or null List of DNS records required for sending emails |
A 401 response
A 404 response
{- "domain": {
- "created_at": "Thu, 13 Oct 2011 18:02:00 GMT",
- "id": "123456789012345678901234",
- "name": "example.com",
- "require_tls": true,
- "smtp_login": "postmaster@example.com",
- "spam_action": "disabled",
- "state": "active",
- "type": "sandbox",
- "use_automatic_sender_security": true,
- "web_prefix": "email",
- "web_scheme": "http"
}
}
Update domain configuration like smtp credentials, enable/disable automatic sender security, spam actions, wildcard, or tracking web scheme.
A 200 response
A 401 response
A 404 response
{- "domain": {
- "created_at": "Thu, 13 Oct 2011 18:02:00 GMT",
- "id": "123456789012345678901234",
- "name": "example.com",
- "require_tls": true,
- "smtp_login": "postmaster@example.com",
- "spam_action": "disabled",
- "state": "active",
- "type": "sandbox",
- "use_automatic_sender_security": true,
- "web_prefix": "email",
- "web_scheme": "http"
}, - "receiving_dns_records": [
- {
- "cached": [ ],
- "name": "example.com",
- "priority": "10",
- "record_type": "MX",
- "valid": "unknown"
}
], - "sending_dns_records": [
- {
- "cached": [
- "mxa.example.com",
- "mxb.example.com"
], - "name": "example.com",
- "priority": "10",
- "record_type": "A",
- "valid": "valid",
- "value": "1.2.3.4"
}
]
}
Verify the domains DNS records (includes A, CNAME, SPF, DKIM and MX records) to ensure the domain is ready and able to send
A 200 response
A 401 response
A 404 response
A 429 response
{- "message": "Domain DNS records have been updated",
- "domain": {
- "created_at": "Mon, 02 Jan 2006 15:04:05 MST",
- "id": "123456789012345678901234",
- "name": "example.com",
- "require_tls": true,
- "smtp_login": "postmaster@example.com",
- "spam_action": "disabled",
- "state": "unverified",
- "type": "sandbox",
- "use_automatic_sender_security": true,
- "web_prefix": "email",
- "web_scheme": "http",
- "disabled": {
- "code": "blacklisted",
- "note": "for debugging",
- "permanently": true,
- "reason": "bad customer"
}
}, - "sending_dns_records": [
- {
- "cached": [
- "mxa.example.com",
- "mxb.example.com"
], - "name": "example.com",
- "priority": "10",
- "record_type": "A",
- "valid": "valid",
- "value": "0.0.0.0"
}
], - "receiving_dns_records": [
- {
- "cached": [
- "mxa.example.com",
- "mxb.example.com"
], - "name": "example.com",
- "priority": "10",
- "record_type": "A",
- "valid": "valid",
- "value": "0.0.0.0"
}
]
}
The domain must not be disabled or used as an authority for an other domain. Sandbox domain can't be deleted.
{- "message": "Domain will be deleted in the background"
}