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

/mail/lists

First published 3 Oct 20260.1.0Unchanged since publication

Add an entry to a server-wide mail sender list

Who may call it
AdministratorResellerCustomer
Token scope, any of
mailall
Answers201 Created

The selected list applies to every recipient domain. Use allow or block with an email address such as someone@example.net, a domain such as example.net or a wildcard domain such as *.example.net. A wildcard matches subdomains at any depth. Both lists match envelope and header senders. UrbeStack rejects blocked senders during SMTP and skips spam scoring for allowed senders. Block entries take precedence. Allowing a major provider's entire domain lets forged senders from that domain bypass spam scoring. UrbeStack already trusts those providers when DKIM or DMARC verifies their mail.

Use nogreylist to skip greylisting while keeping spam scoring active. A plain or wildcard domain entry matches when SPF passes for the envelope sender or a DKIM signature from the sender domain verifies. A sending IP address or CIDR network, such as 203.0.113.5, 203.0.113.0/24 or 2001:db8::/32, matches by sending IP address alone.

Each server-wide list holds up to 50,000 entries. The request fails if the entry is already present or the list is full. An invalid kind returns 400. The 201 response returns the new entry with id, kind, entry and created_at. Its domain is null. Requires an administrator token with the mail scope.

As a command

Run as root on the server

Request body

JSON ·MailListEntryCreate· 2 fields
entrystring, up to 320 charactersRequired
An email address, a domain, or *.domain to match every subdomain of that domain. With nogreylist, a sender domain with or without the wildcard matches only mail verified for that domain by SPF or DKIM, and the server-wide list also accepts a sending server IP address or network.
kindstring, one of allow, block, nogreylistRequired
Use allow to bypass greylisting and spam scoring, block to refuse mail from the sender, or nogreylist to bypass greylisting while retaining spam scoring.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/mail/lists" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entry": "text",
    "kind": "allow"
  }'
Response · 201 Created
{
  "entry": {
    "created_at": "2026-09-09T10:15:00Z",
    "domain": "example.com",
    "entry": "text",
    "id": 1,
    "kind": "profile"
  }
}

Errors

21 errors, each a status and a sentence
400<what> must be text without control characters, 1 to <max> characters
400At most <LIST_LINES_MAX> lines at once; this one has
400Domain name required
400Domain name too long
400Give --allow ENTRY, --block ENTRY or --nogreylist ENTRY, one of them
400Give --domain DOMAIN or --server
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid mail address
400Invalid mail address: local part over 64 characters
400Invalid mail address: no local part
400Invalid mail address: the local part may hold letters, digits, dots, _ + and -
400Invalid port
400Invalid setting key
400List type must be allow, block, or nogreylist.
400That list holds at most <max> entries
400With --stdin, specify --kind allow, block, or nogreylist, and omit the entry argument.
401Authentication required
404Setting '<key>' not found
409<entry> is already on that <kind> list
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-mail-lists/