API for creating and deleting mailboxes

Hello. As part of testing a product using autotests it’s necessary to create a certain number of new users (a new mailbox is required for registration for each one, to which a registration link is sent). After the test is completed, the user and his mailbox should be deleted. Is it possible to implement this using your service? Is there an API for creating and deleting mailboxes?

Hi Dmitry,

Yes, the process you are describing is entirely possible with our service, and we can help simplify it using a custom private domain.

With a zero-setup custom subdomain, included in all our paid plans, you can send emails to any address within that domain without needing to recreate the address manually. Additionally, you can delete messages programmatically once you’ve received the registration code, using our REST API.

There’s no need to delete mailboxes since you control message retention with a private domain. Messages can be manually or automatically removed using our API, and older messages are removed when the storage limit is reached.

For guidance on setting up a custom domain, check out our short video tutorial.

Let us know if you need help getting started or have additional questions.

Hi, and thank you very much for your response to my request. Let’s clarify a few points. If I understand correctly, it’s possible to create a custom subdomains. Then, when registering in the application being tested, I can specify a randomly generated string + this created subdomain as the user’s email address, and such an email address will be automatically created, so all notifications necessary for testing will be sent to it. And I’ll be able to access the notification using the API. Is that correct?
If so, how many such address can I create per day/month?

Hi Dmitry,

Yes, you can use a randomly generated string + the subdomain you created as the user’s email address. For example [email protected] or [email protected]. Once the email has been sent to that address it will be accessible via the API. The listmessages endpoint can be used to retrieve metadata about the messages sent to a particular address. You could also use the inbox which will list messages across all your custom domains and private addresses.

We also have other features like Catch-all forwarding, Webhook forwarding and Websocket forwarding. The Catch-all and webhook forwarding can work together. This allows you to get a webhook notification anytime an email is received in your domain.

I’m glad to answer any followup questions you may have. I’ve worked with hundreds of customers and have detailed knowledge of our platform, so I hopefully :crossed_fingers: can provide you with some guidance about what works best with our platform and how customers have gotten the most value out of our services.

Michael