-
Notifications
You must be signed in to change notification settings - Fork 1
3. Documentation of API methods
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.
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.
Equivalent to hello_world, but only available after authentication with auth.
Function to authenticate against the mailbox Business API.
See also deauth
Function to de-authenticate from the mailbox Business API.
See also auth
Functions on the account level, such as CRUD-operations.
Function to search accounts. Optionally, extended attributes for the result can be requested by settings the parameter extended_results = True.
Function to create a new account. See also account_del
Note: This function requires reseller or admin level.
Function to retrieve a single account and view information.
Similar to account_get, but returns an Account object.
All available parameters are populated automatically.
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 |
Function to delete a given account. See also account_add
Note: This function requires reseller or admin level.
Functions to manage invoices.
Note: If you are a customer of a reseller, you won't receive invoices from mailbox.
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)
Retrieves an invoice of a given account and a given token.
Similar to invoice_get, but returns an Invoice object.
All available attributes are populated automatically.
Function to get a list of all invoice numbers for a given account.
Helper function to get a list of all open invoices for a given account.
Helper function to get the token for a given account and invoice_id.
Note: the tokens are time-based and change.
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'))Function to list all domains of a given account. Optionally, a search string can be used to get filtered results.
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.
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.
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:
- 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.
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.
Function to create a new mailbox.
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
Similar to mail_get, but returns a Mail object.
All available attributes are populated automatically.
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 |
This helper function is a shortcut for mail_setto set a new password for a given mailbox.
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.
This helper function is a shortcut for mail_set to set/change the plan for a given mailbox.
This helper function is a shortcut for mail_set to manage forwarder addresses for a given mailbox.
This helper function is a shortcut for mail_set to manage alias addresses for a given mailbox.
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.
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.
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.
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.
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.
This function deletes a mailbox.
Function to list all existing mail app passwords for a mailbox.
Function to generate and add a new mail app password for a mailbox.
Function to delete a mail app password for a mailbox.
Function to set an external UID for a given mailbox. The UID has to be unique for the account the mailbox is associated with.
This function returns a list of available mail backups for a given mailbox.
This function restores a mail backup for a given mailbox.
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.
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.
Function to add a new group to a given account. The group has a name and a display_name shown in the UI.
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.
Function to change the members of a group.
Note: The account parameter is only required when operating from the admin or reseller level.
Function to delete a group.
Note: The account parameter is only required when operating from the admin or reseller level.