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

/domains/{name}/mail/accounts

First published 3 Oct 20260.1.0Unchanged since publication

Create a mailbox on the domain

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

Supply the email address's local part in local and the mailbox password in password. The email address must be unused by any other mailbox, and the customer's package must allow another mailbox. UrbeStack creates the mailbox's Maildir in the customer's home.

Set quota_mb to a whole number from 0 to 1048576 megabytes. It defaults to 0 for unlimited storage. Only administrators can set hourly_limit. It takes a whole number from 0 to 1000000 messages per hour. Use 0 for no mailbox-level sending limit. Omit hourly_limit or send an empty string or null to use the domain's default. Invalid quota_mb or hourly_limit values return 400.

The 201 response contains the new mailbox in account. Administrators, the domain's owner and the owner's reseller can call this operation with a token that has the mail scope.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired

Request body

JSON ·MailAccountCreate· 4 fields
localLocalPartRequired
The part of an email address before the @ is stored in lowercase.
passwordstring, up to 128 charactersRequired
hourly_limitinteger, 0 to 1000000 or null
Hourly sending limit for the mailbox, or null for the domain default. Only administrators can set this field, and requests from customers or resellers return 403.
quota_mbinteger, 0 to 1048576
Mailbox quota in megabytes, or 0 for no limit.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/domains/example.com/mail/accounts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hourly_limit": 1,
    "local": "info",
    "password": "Sup3r-Secret-Passphrase",
    "quota_mb": 1
  }'
Response · 201 Created
{
  "account": {
    "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
    }
  }
}

Errors

19 errors, each a status and a sentence
400--address is required
400<what> must be a whole number from 0 to <max>
400<what> must be text without control characters, 1 to <max> characters
400A password is required: --password-stdin or --password-hash
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
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 password: 8 to 128 printable characters
400Invalid port
400Invalid setting key
401Authentication required
404Setting '<key>' not found
409Mail account <local>\@<domain_name> already exists
409The package <p.name> allows <limit>
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-domains-name-mail-accounts/