mailbox_create
Create an email mailbox on a FastPanel domain, with optional aliases, forwarding, quota, spam handling, and one-time generated passwords.
Instructions
Create a mailbox in an email domain. Maps to POST /api/email/domains/{domain_id}/boxs. WRITE operation — set dry_run:true first, then confirm:true to execute. Pass either password or generate_password:true (recommended): the generated password is returned ONCE in the result as generated_password and can never be read back afterwards (FastPanel keeps only a hash) — store it in a password manager immediately. If the local password store is enabled (FASTPANEL_PASSWORD_STORE=keychain) the password — generated or explicit — is also saved there automatically and stays retrievable via mailbox_password_get. redirects forwards incoming mail to other addresses; with redirects set, save_in_box decides whether a copy also stays in this box. aliases are extra local parts on the same domain delivering to this box. Async: the response comes back with action:"CREATING" and the box becomes usable a second or two later (mailbox_get shows action:null when done).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"domain_id": "<domain_id>",
"login": "<login>"
},
"name": "mailbox_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| login | Yes | Local part before the @, e.g. 'support' for support@example.com | |
| quota | No | Mailbox quota in MB (rendered as dovecot quota_rule bytes=<n>M); 0 = unlimited | |
| aliases | No | Alias local parts on the same domain, e.g. ['info','hello'] | |
| confirm | No | Must be true to execute. Safety guard. | |
| dry_run | No | If true, show the payload that would be sent without executing. | |
| password | No | Mailbox password (8-255 chars). Omit when generate_password is true. | |
| domain_id | Yes | Email domain id from email_domains_list | |
| redirects | No | Forward incoming mail to these addresses | |
| save_in_box | No | Keep a local copy when redirects are set. Default: true if redirects are given (false would make the box forward-only). | |
| spam_to_junk | No | Deliver detected spam to the Junk folder (panel default for existing boxes) | |
| generate_password | No | Generate a strong random 24-char password and return it once in the result. |