MailMasker API
Claude Code
Catch-all routing

Set a domain's catch-all

PUT/api/v1/domains/:domain/catch-all

Who can use this: Site admins, and accounts granted the domains.catchall permissionAs Markdown

Sets or replaces the domain's catch-all, and turns mail on for the domain, even one that was disabled. A domain the system doesn't serve yet is added, but gets no DNS zone here, so its mail must already be pointed at this system.

Parameters

NameWhereWhat it is
domain required path The domain whose mail to catch.e.g. example.org
destination required body The mailbox it goes to. It must not be at the same domain.e.g. you@example.com
send_enabled body Whether that mailbox may also send from any address at the domain. Left out, it stays as it was (off for a new catch-all).

Good to know

  • The destination isn't checked here, so check it first with Check that a mailbox exists, as myaccount does.
  • A destination at the same domain answers 400, and one that is itself an extra address answers 409, since either would loop.