Skip to main content

Managing email accounts over the API

Types of mailboxes

In our API, we differentiate between two types of mailboxes:

  • E-Mail adresses are used to send and receive emails. They are either associated with a mailbox (that you can connect to using an email client) or with a forwarding address (that forwards all incoming emails to one or more other email addresses).
  • Delivery boxes are used to send emails. They are used to send emails from a web application or a script.

Requirements

To manage email accounts, you will need an existing project. You can create a new project using the Creating a project guide.

Create a new email account

To create a new email account, send a request to the POST/v2/projects/{projectId}/mail-addresses/ endpoint. The request body must contain a JSON object with the following properties:

  • addressstring (idn-email)
    required
  • isCatchAllboolean
    required
  • mailboxobject
    required
    • enableSpamProtectionboolean
      required
    • passwordstring
      required
    • quotaInBytesnumber (≥ -1)
      required

      2 GB

Create a new forwarding address

A forwarding address is an email address that forwards all incoming emails to one or more other email addresses. To create a new forwarding address, send a request to the POST/v2/projects/{projectId}/mail-addresses/ endpoint. The request body must contain a JSON object with the following properties:

  • addressstring (idn-email)
    required
  • forwardAddressesarray of string (idn-email)
    required
    • Array[
    • *string (idn-email)
    • ]

Create a new delivery box

A delivery box is an email address that can be used to send emails from a web application or a script. To create a new delivery box, send a request to the POST/v2/projects/{projectId}/delivery-boxes/ endpoint. The request body must contain a JSON object with the following properties:

  • description (string, required): A description for the delivery box. This description will be displayed in the web interface.
  • password (string, required): The password for the delivery box. This password will be used to authenticate against the SMTP server.

Deleting email accounts

To delete an email address or a delivery box, send a request to the DELETE/v2/mail-addresses/{mailAddressId}/ or DELETE/v2/delivery-boxes/{deliveryBoxId}/ endpoint, respectively. The id parameter must contain the ID of the email address or delivery box you want to delete. No request body is needed.