# See a domain's catch-all

`GET https://api.mailmasker.org/api/v1/domains/:domain/catch-all`

Where one domain's catch-all sends mail, if anywhere.

- Who can use it: Site admins, and accounts granted the domains.catchall permission
- Area: Catch-all routing
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/catch-all-show

`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 | In | Required | What it is | Example |
|---|---|---|---|---|
| `domain` | path | yes | The domain name. | `example.org` |

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/domains/example.org/catch-all' \
  -H "Authorization: Bearer $TOKEN"
```

Perl:

```perl
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";
```

homelab-cli:

There is no homelab-cli command for this yet.

## Response

200 OK:

```json
{
  "domain": "example.org",
  "managed": true,
  "mail_enabled": 1,
  "active": 1,
  "destination": "you@example.com",
  "catchall_active": 1
}
```
