api.mail

remove()

api.mail.remove(id) → Promise<{ ok: true }>

Deletes a mailbox, its aliases and its routing. The address stops receiving at once.

DELETEaliases go with itno undo
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

await api.mail.remove("hello@example.com");
api.mail.remove("hello@example.com")

What goes

  • The mailbox and its messages.
  • Its aliases — they were addresses landing here, and there is no here any more.
  • Its routing: the address stops receiving.
  • Its forwarding.
Mail sent to it afterwards is refused at the door

Refused rather than accepted and bounced later — accepting a message for an address that is gone and bouncing it afterwards is what wrecks a sending reputation for everyone on the same infrastructure.

The host stays enabled

The records on the domain are untouched, so another mailbox can be created on it immediately. To remove the mail configuration itself, use mail.disable().

The space comes back

What its messages and attachments held is released into the account's object storage.

It frees a place in the plan

usage().mailboxes drops, and another can be created.