Get your free beta license ↗
API operation · mail group
GET

/domains/{name}/mail

First published 3 Oct 20260.1.0Last changed 25 Nov 20260.2.341 change to view
Latest change (release 0.2.34): Added the mx_here field.

Get the domain's mail settings and configuration status

Who may call it
AdministratorResellerCustomer
Token scope, any of
mailreadall
Answers200 OK

An administrator, the domain's owner, or the owner's reseller can call this operation with a token that has the mail scope. A 200 response returns the mail object with the domain's settings, effective spam policy, server policy, mail accounts, forwarders, domain and account filters, allow and block lists, and DKIM records.

The records field lists the managed mail and webmail DNS records in zone. A subdomain's records can be in its parent zone. A domain with remote mail routing has managed mail and webmail records only while it is on hold. The public_nameservers field lists the nameservers found in public DNS. The delegated_here field is yes if any of them match UrbeStack's nameservers, no if the lookup succeeds without a match, or unknown if there is no local zone or the lookup is unavailable. The mx_here field is checked only when delegated_here is no: it is yes if the domain's MX record in public DNS points to this server, no if it does not, and unknown when it is not checked. When mail is on hold, hold_nameservers lists the nameservers to use for the domain.

The certificate field indicates whether the domain has an issued certificate and whether it covers mail.{name} and webmail.{name}, including wildcard coverage. The installed field is true when mail is enabled and Postfix, Dovecot, and Rspamd are installed. The webmail_url field is null unless webmail is active and routing is local. The URL uses webmail.port, which defaults to 8446, and the path /webmail/.

The check_resolvers field lists the DNS resolver IP addresses in query order. It uses mail.check_resolvers and defaults to 1.1.1.1 followed by 8.8.8.8. The smarthost field is null when no smarthost is configured. For a configured smarthost, tls defaults to true and has_password indicates whether a password is configured.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/domains/example.com/mail" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "mail": {
    "account_hourly_limit": 1,
    "accounts": [
      {
        "address": "info@example.com",
        "autoresponder": {
          "body": "text",
          "end": "text",
          "interval_days": 1,
          "start": "text",
          "subject": "text"
        },
        "created_at": "2026-09-09T10:15:00Z",
        "domain": "example.com",
        "home": "text",
        "hourly_limit": 1,
        "id": 1,
        "local_part": "text",
        "login_suspended": 1,
        "outgoing_suspended": 1,
        "quota_mb": 1,
        "updated_at": "text",
        "usage": {
          "messages": 1,
          "storage_kb": 1,
          "storage_limit_kb": 1
        }
      }
    ],
    "certificate": {
      "covers_mail": true,
      "covers_webmail": true,
      "installed": true
    },
    "check_resolvers": [
      "text"
    ],
    "default_address": {},
    "delegated_here": "yes",
    "dkim": [
      {}
    ],
    "dkim_selector": "text",
    "domain": "example.com",
    "filters": [
      {
        "action": {
          "action": "folder",
          "target": "https://example.com/new"
        },
        "address": "info@example.com",
        "created_at": "2026-09-09T10:15:00Z",
        "domain": "example.com",
        "id": 1,
        "name": "alice",
        "position": 1,
        "rules": {}
      }
    ],
    "forwarders": [
      {
        "address": "info@example.com",
        "created_at": "2026-09-09T10:15:00Z",
        "destinations": [
          "text"
        ],
        "domain": "example.com",
        "id": 1,
        "local_part": "text"
      }
    ],
    "hold": 1,
    "hold_checked_at": "text",
    "hold_ended_at": "text",
    "hold_ended_by": "text",
    "hold_nameservers": [
      "text"
    ],
    "hold_since": "text",
    "hourly_limit": 1,
    "lists": [
      {
        "created_at": "2026-09-09T10:15:00Z",
        "domain": "example.com",
        "entry": "text",
        "id": 1,
        "kind": "profile"
      }
    ],
    "outbound_ip": "text",
    "outgoing_suspended": 1,
    "policy": {
      "dkim": 1,
      "enabled": 1,
      "greylisting": 1,
      "junk_folder": 1,
      "junk_score": 1,
      "reject_score": 1
    },
    "public_nameservers": [
      "text"
    ],
    "records": [
      {
        "content": "text",
        "key": "panel.port",
        "name": "alice",
        "type": "rebuild",
        "zone": "text"
      }
    ],
    "routing": "text",
    "server_addresses": [
      "text"
    ],
    "server_policy": {},
    "smarthost": {
      "has_password": true,
      "host": "text",
      "port": 8443,
      "tls": true,
      "user": "alice"
    },
    "spam": {},
    "user": "alice",
    "web_sending": 1,
    "webmail_url": "text",
    "zone": "text"
  }
}

Errors

14 errors, each a status and a sentence
400--name is required
400<what> must be text without control characters, 1 to <max> characters
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid port
400Invalid setting key
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
404No such domain: <name>
404Setting '<key>' not found

Change log

1 change since publication, newest first
0.2.3425 Nov 2026
Added the mx_here field.The field reports whether the domain’s public MX record points to this server. The operation checks only when delegated_here is no and reports unknown otherwise.
0.1.03 Oct 2026
First published.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry last changed in release 0.2.34 on 25 Nov 2026.
urbestack.com/docs/api/get-domains-name-mail/