Skip to content

Add domain

Request

Register a new domain for sending emails. This will generate DKIM keys and DNS records. After adding, use the DNS endpoint to get records that need to be configured.

The new domain starts in security_status: pending_scan while an automated reputation scan runs in the background (DNS records are returned immediately — the scan does not delay this response). Sending from the domain is soft-blocked and retriable until it becomes active. See the security_status field on the Domain schema.

Security
ApiKeyAuth
Bodyapplication/jsonrequired
domainstring^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,}$required

Fully qualified domain name

Example:"mail.acme.com"
tagsArray of strings

Optional tags for categorization

Example:
[ "production", "transactional" ]
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/customer/domains \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "domain": "mail.acme.com",
    "tags": [
      "production",
      "transactional"
    ]
  }'

Responses

Domain created successfully

Bodyapplication/json
domainobject(DomainDetail)
security_statusstring

Initial security state of the new domain. Normally pending_scan while the automated reputation scan runs; may be under_review/suspended immediately if the domain has a prior security history.

Enum:"pending_scan""active""under_review""suspended"
sending_allowedboolean

True only when security_status is active.

Response
{ "domain": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "domain": "string", "verification_status": "pending", "security_status": "pending_scan", "sending_allowed": true, "dkim_selector": "string", "spf_record": "string", "dmarc_record": "string", "is_active": true, "tags": [], "created_at": "2019-08-24T14:15:22Z", "verified_at": "2019-08-24T14:15:22Z", "tracking_domain_id": "5f006f10-e2bc-4b1b-bec7-ea6719f1d4a5", "assignment_type": "explicit", "tracking_domain_info": {}, "verification_token": "string", "dkim_private_key": "string", "dkim_public_key": "string" }, "security_status": "pending_scan", "sending_allowed": true }