Create domain

Adds a domain and generates its DKIM key. The response includes the DNS records to publish.

POST/domains

Body parameters

  • namestringrequired

    Domain or subdomain, e.g. mail.example.com.

The domain object

A sending domain and the DNS records it needs.

  • objectstring

    Always domain.

  • idstring

    Unique ID of the domain.

  • namestring

    The domain, e.g. mail.acme.com.

  • statusstring

    pending (records not found yet), partially_verified, verified or failed.

  • created_atstring

    When it was created (ISO 8601, UTC).

  • open_trackingboolean

    Whether opens are tracked with a pixel.

  • click_trackingboolean

    Whether links are rewritten to track clicks.

  • tlsstring

    opportunistic (use TLS when the receiving server supports it) or enforced (bounce otherwise).

  • receivingobject

    Receiving mail on this domain.

    Show 3 fields
    • receiving.enabledboolean

      Whether mail to this domain is accepted.

    • receiving.statusstring

      disabled, pending (MX record not found yet) or verified.

    • receiving.recordobject

      The MX record to publish.

      Show 4 fields
      • receiving.record.typestring

        DNS record type: TXT, MX or CNAME.

      • receiving.record.namestring

        Host name to publish the record at.

      • receiving.record.valuestring

        The record’s value.

      • receiving.record.prioritynumber

        Priority, for MX records only.

  • tracking_domainobject | null

    Your own subdomain for tracking links, if set.

    Show 3 fields
    • tracking_domain.namestring

      e.g. links.mail.acme.com.

    • tracking_domain.statusstring

      pending, provisioning, active or failed.

    • tracking_domain.recordobject

      The CNAME record to publish.

      Show 4 fields
      • tracking_domain.record.typestring

        DNS record type: TXT, MX or CNAME.

      • tracking_domain.record.namestring

        Host name to publish the record at.

      • tracking_domain.record.valuestring

        The record’s value.

      • tracking_domain.record.prioritynumber

        Priority, for MX records only.

  • recordsobject[]

    Every DNS record the domain needs.

    Show 7 item fields
    • records[].recordstring

      What it’s for: DKIM, SPF, MX or DMARC.

    • records[].typestring

      DNS record type: TXT, MX or CNAME.

    • records[].namestring

      Host name to publish the record at.

    • records[].valuestring

      The record’s value.

    • records[].prioritynumber

      Priority, for MX records only.

    • records[].statusstring

      verified or not_started.

    • records[].optionalboolean

      true for recommended records (DMARC) that sending doesn’t need.

Request

curl -X POST 'https://api.mailvina.com/domains' \
  -H 'Authorization: Bearer mv_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "mail.acme.com"
}'

Response

{
  "object": "domain",
  "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
  "name": "mail.acme.com",
  "status": "pending",
  "created_at": "2026-11-14T10:00:00.000Z",
  "open_tracking": true,
  "click_tracking": true,
  "tls": "opportunistic",
  "tracking_domain": null,
  "records": [
    {
      "record": "DKIM",
      "type": "TXT",
      "name": "mailvina._domainkey.mail.acme.com",
      "value": "p=MIIBIjANBgkqh…",
      "status": "verified",
      "optional": false
    },
    {
      "record": "SPF",
      "type": "TXT",
      "name": "send.mail.acme.com",
      "value": "v=spf1 include:spf.mailvina.com ~all",
      "status": "verified",
      "optional": false
    },
    {
      "record": "MX",
      "type": "MX",
      "name": "send.mail.acme.com",
      "value": "feedback-smtp.mailvina.com",
      "priority": 10,
      "status": "verified",
      "optional": false
    },
    {
      "record": "DMARC",
      "type": "TXT",
      "name": "_dmarc.mail.acme.com",
      "value": "v=DMARC1; p=none; rua=mailto:[email protected]",
      "status": "not_started",
      "optional": true
    }
  ]
}