Skip to content

3. Documentation of API methods

Hendrik Schlange edited this page Jun 8, 2026 · 43 revisions

The goal of the package is to mirror the official mailbox Business API. Therefore, it's neither practical nor necessary to mirror the whole documentation. Instead, this page aims to document diversions and give additional information for certain functions.

General

hello_world

Simple hello world function of the API to check if communication with the API works.
Currently broken due to issues at mailbox (the API claims that nobody has access rights to call the method).

This and auth are the only two calls that work without authentication.

hello_innerworld

Equivalent to hello_world, but only available after authentication with auth.

auth

Function to authenticate against the mailbox Business API.
See also deauth

deauth

Function to de-authenticate from the mailbox Business API.
See also auth

account

Functions on the account level, such as CRUD-operations.

account_list

Function to search accounts. Optionally, extended attributes for the result can be requested by settings the parameter extended_results = True.

account_add

Function to create a new account. See also account_del

Note: This function requires reseller or admin level.

account_get

Function to retrieve a single account and view information.

account_get_object (helper function)

Similar to account_get, but returns an Account object.
All available parameters are populated automatically.

account_set

Function to change information of a given account. Supports the following parameters to set:

Parameter Type
password String
telephone_password String
plan String
memo String
contact_mail String
contact_mail_payment String
contact_phone String
contact_fax String
contact_mobile String
address_main_first_name String
address_main_last_name String
address_main_street String
address_main_zipcode String
address_main_town String
address_main_country String
address_payment_same_as_main Boolean
address_payment_first_name String
address_payment_last_name String
address_payment_company String
address_payment_street String
address_payment_zipcode String
address_payment_town String
company String
bank_iban String
bank_bic String
bank_account_owner String
payment_type Dictionary
ustid String
av_contract_accept_name String
max_mailinglist Integer
tarifflimits Dictionary
av_contract_professional_secrecy Boolean
language String

account_del

Function to delete a given account. See also account_add

Note: This function requires reseller or admin level.

Invoice

Functions to manage invoices.
Note: If you are a customer of a reseller, you won't receive invoices from mailbox.

account_invoice_list

Lists all invoices of a given account.
The response includes all invoice numbers as well as information for each invoice.
Helper functions are available to only retrieve invoice numbers (account_invoice_get_list) or a list of open invoice numbers (account_invoice_get_list_open)

account_invoice_get

Retrieves an invoice of a given account and a given token.

account_invoice_get_object (helper function)

Similar to invoice_get, but returns an Invoice object.
All available attributes are populated automatically.

account_invoice_get_list (helper function)

Function to get a list of all invoice numbers for a given account.

account_invoice_get_list_open (helper function)

Helper function to get a list of all open invoices for a given account.

account_invoice_get_token (helper function)

Helper function to get the token for a given account and invoice_id.
Note: the tokens are time-based and change.

account_invoice_get_file (helper function)

Helper function to get the file for a given account and invoice_id.
Support all three file types: csv, pdf and xml.

The function automatically retrieves the token for the invoice, loads the data, decodes the Base64 data, decompresses the gz and returns the bytes.

Usage:

invoice_id = 'BMBO-1234-24'
account_name = 'foo'
with open(invoice_id + '.pdf', 'w') as file:
    file.write(api.account_invoice_get_file(account_name, invoice_id, 'PDF'))

domain

domain_list

Function to list all domains of a given account. Optionally, a search string can be used to get filtered results.

domain_get_list (helper function)

This function is similar to domain_list, but instead of returning a List of Dictionaries for each domain, this functions returns a List object containing all domain names associated with a given account.

domain_add

Function to add a new domain to a given account.
Note: a password has to be given for the domain, as certain functions can also be called from the domain level.

domain_get

domain_capabilities_set

domain_set

domain_del

domain_validate_spf

mail

mail_list

Function to retrieve a list of mails and a number of details for each of them.
This function also supports pagination and sorting.

The following sort fields can be set using the parameter sort_field:

  • mail
  • first_name
  • last_name
  • status
  • domain
  • plan
  • type
  • creation_date

Additionally, the sort order can be set using sort_order. This can be either asc or desc.

mail_get_list

Function similar to mail_list, but instead of returning a bunch of dicts, this function simply returns a List object containing all mail addresses for a given account.

Note: this function does not support pagination or sorting. It will always return the full list of addresses as returned by the mailbox API.

mail_add

Function to create a new mailbox.

mail_get

Function to retrieve a mailbox and its details from the mailbox API.

Optionally, usage of the current quota can be retrieved using include_quota_usage = True

mail_get_object (helper function)

Similar to mail_get, but returns a Mail object.
All available attributes are populated automatically.

mail_set

Function to change a given inbox. Supports the following parameters:

Parameter Type
password String
password_hash String
same_password_allowed Boolean
require_reset_password Boolean
plan String
additional_mail_quota Integer
additional_cloud_quota Integer
first_name String
last_name String
inboxsave Boolean
forwards List
aliases List
alternate_mail String
memo String
allow_nets String
active Boolean
title String
birthday String
position String
department String
company String
street String
postal_code String
city String
phone String
fax String
cell_phone String
uid_extern String
language String
deletion_date String

mail_set_password (helper function)

This helper function is a shortcut for mail_setto set a new password for a given mailbox.

mail_set_password_require_reset (helper function)

This helper function is a shortcut for mail_set to set a new password for a given mailbox and to require the user to change their password upon the next login.

mail_set_plan (helper function)

This helper function is a shortcut for mail_set to set/change the plan for a given mailbox.

mail_set_forwards (helper function)

This helper function is a shortcut for mail_set to manage forwarder addresses for a given mailbox.

mail_set_aliases (helper function)

This helper function is a shortcut for mail_set to manage alias addresses for a given mailbox.

mail_set_state (helper function)

This helper function is a shortcut for mail_set to set the active state for a given mailbox.
As this adheres to the way mail_set works, the parameter is a Boolean for the active state, e.g. active = True.

mail_set_additional_mail_quota (helper function)

This helper function is a shortcut for mail_set to set additional mail quota (in GB) for a given mailbox.

Note: This is not available in all plans.

mail_set_additional_cloud_quota (helper function)

This helper function is a shortcut for mail_set to set additional cloud quota (in GB) for a given mailbox.

Note: This is not available in all plans.

mail_set_deletion_date (helper function)

This helper function is a shortcut for mail_set to set a deletion date for a given mailbox.
The mailbox will be deleted on that date.

mail_capabilities_set

This function sets the capabilities for a given mailbox.
Possible capabilites include:

  • MAIL_SPAMPROTECTION
  • MAIL_BLACKLIST
  • MAIL_BACKUPRECOVER
  • MAIL_OTP
  • MAIL_PASSWORDRESET_SMS

Note: Not every capability is available in every plan.

mail_del

This function deletes a mailbox.

mail_apppassword_list

Function to list all existing mail app passwords for a mailbox.

mail_apppassword_add

Function to generate and add a new mail app password for a mailbox.

mail_apppassword_del

Function to delete a mail app password for a mailbox.

mail_externaluid

Function to set an external UID for a given mailbox. The UID has to be unique for the account the mailbox is associated with.

mail_backup_list

This function returns a list of available mail backups for a given mailbox.

mail_backup_import

This function restores a mail backup for a given mailbox.

group

Group calls require special setup by mailbox and are not available for every customer by default.

Note: If you want to use these functions, contact mailbox to prepare your account.

group_list

Function to list all groups an account.
The function returns name, display_name and the group_id. The group_id is required for most other operations related to groups.

Note: The account parameter is only required when operating from the admin or reseller level.

group_add

Function to add a new group to a given account. The group has a name and a display_name shown in the UI.

group_get

Function to get a group, its name, display_name and its members.

Note: The account parameter is only required when operating from the admin or reseller level.

group_set

Function to change the members of a group.

Note: The account parameter is only required when operating from the admin or reseller level.

group_del

Function to delete a group.

Note: The account parameter is only required when operating from the admin or reseller level.

mailinglist

Clone this wiki locally