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

/domains/{name}/mail/accounts/{local}

First published 3 Oct 20260.1.0Unchanged since publication

Update a mailbox or end its sessions

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

Supply at least one setting to change or set end_sessions to true. The API returns 400 if the request contains no change and 404 if the mailbox does not exist on the domain. Set password to change the mailbox password. Set end_sessions to true to close all open IMAP and POP3 sessions immediately and revoke webmail sign-in tickets. You can do this on its own or when changing the password.

Set quota_mb to a whole number from 0 to 1048576 megabytes. Use 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, or send an empty string or null to restore the domain's default.

Set login to false to block IMAP and POP3 sign-in and authenticated sending while incoming mail continues to arrive. Set outgoing to false to block sending while users can still read mail. used_by_person defaults to true and indicates that a person uses the mailbox in their own mail client. Set it to false for a mailbox used only by bots. This setting determines the defaults for new bot keys.

Supply an autoresponder object to set it, or send null to remove it. subject must contain 1 to 200 characters without ASCII control characters. body must contain 1 to 10000 characters without NUL characters. Supply start, end or both in YYYY-MM-DD format. When both are set, end must be on or after start. interval_days takes a whole number from 1 to 30 and defaults to 1. The autoresponder replies from the mailbox's email address at most once per sender per interval and skips mailing lists and bounces.

The 200 response contains the updated 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 commands

Run as root on the server

Parameters

namepath ·DomainNameRequired
localpath ·LocalPartRequired

Request body

JSON ·MailAccountPatch· 13 fields
autoresponderMailAutoresponder or null
Autoresponder settings. Set to null to remove the autoresponder.
autoresponder.bodystring, up to 10000 charactersRequired
autoresponder.subjectstring, up to 200 charactersRequired
autoresponder.endstring, matching ^\d{4}-\d{2}-\d{2}$ or null
autoresponder.interval_daysinteger, 1 to 30
autoresponder.startstring, matching ^\d{4}-\d{2}-\d{2}$ or null
end_sessionsboolean
Whether to immediately end every open IMAP and POP3 session for the mailbox. Set to true when changing the password to disconnect anyone already signed in.
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.
loginboolean
Whether the mailbox accepts sign-ins. Set to false to suspend sign-ins while continuing to receive mail.
outgoingboolean
Whether the account can send mail. Set to false to reject its outgoing mail.
passwordstring, up to 128 characters
quota_mbinteger, 0 to 1048576
used_by_personboolean
Whether a person also uses the mailbox through their own mail client. BotMail uses this setting to determine the initial configuration of new bot keys.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PATCH "$API/domains/example.com/mail/accounts/info" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "autoresponder": {
      "body": "text",
      "end": "text",
      "interval_days": 1,
      "start": "text",
      "subject": "text"
    },
    "end_sessions": true,
    "hourly_limit": 1,
    "login": true,
    "outgoing": true,
    "password": "Sup3r-Secret-Passphrase",
    "quota_mb": 1,
    "used_by_person": true
  }'
Response · 200 OK
{
  "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

27 errors, each a status and a sentence
400--address is required
400--subject and --body-file are required
400<what> must be a whole number from 0 to <max>
400<what> must be text without control characters, 1 to <max> characters
400An autoresponder needs a body of up to 10000 characters
400An autoresponder needs a subject of up to 200 characters
400Cannot read <file>: $!
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid boolean
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
400Nothing to change
400The <what> date is YYYY-MM-DD
400The body file is an absolute path, or - for standard input
400The end date is before the start date
400The interval is a number of days from 1 to 30
401Authentication required
404No such mail account: <address>
404Setting '<key>' not found
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/patch-domains-name-mail-accounts-local/