Domains
Create a domain
Creates a new domain on the specified service to host email templates.
post/services/{serviceId}/domains/{domainName}
Path parameters
serviceIdstring required
Example:01GVRB50KEQFFE1SGMPFRNBG6J
The serviceId where you want to create a domain.
domainNamestring required
Example:yourdomain.com
The name of the domain to create.
Response
The created domain.
Example response
{
"result": "domain and route created",
"records": {
"receivingRecords": [
{
"priority": 10,
"recordType": "TXT",
"valid": "valid",
"value": "mailgun.org"
}
],
"sendingRecords": [
{
"name": "my.domain.com",
"recordType": "TXT",
"valid": "valid",
"value": "mailgun.org"
}
]
}
}