# List extra addresses

`GET https://api.mailmasker.org/api/v1/domains/mail-aliases`

Every extra address and whole domain routed to an account, and whether it may send from them.

- Who can use it: Site admins
- Area: Domains and DNS
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/aliases-list

`source_pattern` is an exact address, or `@` and a domain for all of that domain's mail; domain catch-alls are listed here too. `destination` is the account it goes to, `active` whether its mail is delivered, and `send_enabled` whether that account may also send from it.

## Parameters

| Name | In | Required | What it is | Example |
|---|---|---|---|---|
| `destination` | query | no | Only what is routed to this account. |  |

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/domains/mail-aliases' \
  -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/mail-aliases',
    { Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
```

homelab-cli:

```bash
homelab-cli dns mail-aliases list
```

## Response

200 OK:

```json
[
  {
    "id": 4,
    "source_pattern": "@example.org",
    "destination": "you@example.com",
    "active": 1,
    "send_enabled": 0,
    "created_by": "you@example.com",
    "created_at": "2026-11-03 21:42:10.123456-06",
    "updated_at": "2026-11-03 21:42:10.123456-06"
  },
  {
    "id": 5,
    "source_pattern": "sales@example.com",
    "destination": "you@example.com",
    "active": 1,
    "send_enabled": 1,
    "created_by": "you@example.com",
    "created_at": "2026-11-03 21:42:10.123456-06",
    "updated_at": "2026-11-03 21:42:10.123456-06"
  }
]
```
