Mailboxes

You may create your own mailbox using this action. It takes a JSON object containing a domain informations.

post/api/v1/add/mailbox

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header X-API-Key

Request body

activeboolean

is mailbox active or not

domainstring

domain name

local_partstring

left part of email address

namestring

Full name of the mailbox user

authsource'mailcow' | 'ldap' | 'keycloak' | 'generic-oidc'

Specifies the authentication source for the mailbox.

password2string

mailbox password for confirmation

passwordstring

mailbox password when using mailcow as the authentication source.

quotanumber

mailbox quota

force_pw_updateboolean

forces the user to update its password on first login

force_tfaboolean

force 2FA enrollment at login

tls_enforce_inboolean

force inbound email tls encryption

tls_enforce_outboolean

force oubound tmail tls encryption

sharedboolean

shared mailbox: no login of its own, members of groups open it through shares; password and password2 may be empty (a random password is set)

Example request

{
  "active": "1",
  "domain": "domain.tld",
  "local_part": "info",
  "name": "Full name",
  "authsource": "mailcow",
  "password": "atedismonsin",
  "password2": "atedismonsin",
  "quota": "3072",
  "force_pw_update": "1",
  "force_tfa": "1",
  "tls_enforce_in": "1",
  "tls_enforce_out": "1",
  "tags": [
    "tag1",
    "tag2"
  ]
}

Response

OK

type'success' | 'danger' | 'error'

Changes