Catch-all routing
See a domain's catch-all
GET /api/v1/domains/:domain/catch-all
Who can use this: Site admins, and accounts granted the domains.catchall permission As Markdown
destination is the catch-all's mailbox, or null for none. A domain the system doesn't serve yet isn't an error: it answers managed false, and setting a catch-all for it adds it.
Parameters
Name Where What it is
domain required
path
The domain name.e.g. example.org
cURL
Perl
homelab-cli
Copy
curl -s 'https://api.mailmasker.org/api/v1/domains/example.org/catch-all' \
-H "Authorization: Bearer $TOKEN"
use Mojo::Base -strict;
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/domains/example.org/catch-all',
{ Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
There's no homelab-cli command for this yet.
Response 200 OK
Copy
{
"domain": "example.org",
"managed": true,
"mail_enabled": 1,
"active": 1,
"destination": "you@example.com",
"catchall_active": 1
}