# List every block and allow entry

`GET https://api.mailmasker.org/api/v1/domains/recipient-access`

The blocked and allowed addresses of every account and site admin, alphabetically.

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

Entries a site admin made have a null `user_email`; the rest belong to the account in `user_email`, which made them for one of its own addresses. An `action` of `OK` is an allow; any other action is a block.

## Parameters

| Name | In | Required | What it is | Example |
|---|---|---|---|---|
| `user` | query | no | Only the entries this account made for itself. |  |

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/domains/recipient-access' \
  -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/recipient-access',
    { 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 recipient-access list
```

## Response

200 OK:

```json
[
  {
    "id": 7,
    "recipient": "news@example.org",
    "action": "REJECT",
    "reason": "Spam",
    "created_by": "you@example.com",
    "user_email": null,
    "created_at": "2026-11-03 21:42:10.123456-06",
    "updated_at": "2026-11-03 21:42:10.123456-06"
  },
  {
    "id": 8,
    "recipient": "shop@example.com",
    "action": "REJECT",
    "reason": "blocked via inbox link",
    "created_by": "pat@example.com",
    "user_email": "pat@example.com",
    "created_at": "2026-11-03 21:42:10.123456-06",
    "updated_at": "2026-11-03 21:42:10.123456-06"
  }
]
```
