## GET /api/v2/me/mail-relay/blocks

**List paused mail relay senders**

Lists your senders that the outbound mail relay has paused right now. The relay pauses a sender when too much of its recent mail looked like spam, phishing, a scam or malware. Choose the sender with `scope`. Use `hosting` with `domain` for a domain on your web hosting. Use `vps` with `vpsId` for a VPS that sends through relay.hostup.se. A pause ends on its own at `blockedUntil`. To end it sooner, call `POST /api/v2/me/mail-relay/blocks/unblock`.

### Related Endpoints

- `POST /api/v2/me/mail-relay/blocks/unblock`: Lift a paused mail relay sender
- `GET /api/v2/me/mail-relay/summary`: Count outbound mail relay messages by status
- `GET /api/v2/me/mail-relay/messages`: List outbound mail relay messages

### Headers

- `Authorization`: Bearer $HOSTUP_API_KEY
- Scope (one of): `read:hosting` (Only when `scope` is `hosting`.), `read:vm` (Only when `scope` is `vps`.)

### Parameters

- `scope` (query, string, required): Which sender to look at. `hosting` takes `domain` and needs the scope `read:hosting`. `vps` takes `vpsId` and needs `read:vm`. Example: `hosting`
  Allowed values: hosting, vps
- `domain` (query, string): A domain on one of your web hosting accounts (main, addon, parked or subdomain). Required when `scope` is `hosting`. Example: `example.com`
- `vpsId` (query, string): The VPS ID (`vps_…`). Required when `scope` is `vps`. Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m3`

### Request Example

```bash
curl "https://cloud.hostup.se/api/v2/me/mail-relay/blocks?scope=hosting" \
  -H "Authorization: Bearer $HOSTUP_API_KEY"
```

### Response Schema

- `blocks` (array<object>, required)
- `blocks[].id` (string, required): The pause ID (`mrb_…`). Example: `mrb_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `blocks[].scope` (string, required): What is paused: one address (`email`), a whole domain (`domain`), an envelope sender (`envelope`) or one IP address of your VPS (`ip`). Example: `email`
  Allowed values: email, domain, envelope, ip
- `blocks[].value` (string, required): The paused address, domain or IP address. Send it unchanged as `blockValue` to lift the pause. Example: `info@example.com`
- `blocks[].category` (string, required, nullable): Why the relay paused the sender, for example `spam`, `phishing`, `scam` or `malware`. Example: `spam`
- `blocks[].reason` (string, required, nullable): The relay's own reason line in English. It can be technical. Example: `email ratio: 9/9 (100%) in 1440m; Cold bulk product listing to many recipients`
- `blocks[].blockedUntil` (string, required): When the pause ends on its own. Example: `2026-10-09T18:00:00.000Z`
- `blocks[].createdAt` (string, required): When the relay first recorded the pause. Example: `2026-10-09T06:00:00.000Z`
- `blocks[].unblockPending` (boolean, required): A lift was requested. The pause ends within a minute. Example: `false`
- `blocks[].selfUnblocksLeft` (integer, required): How many more times you can lift a pause on this sender yourself. You get 3 lifts per sender in 7 days. Example: `3`
- `blocks[].passwordChangeAcknowledgementRequired` (boolean, required): True when the pause is for phishing, a scam, malware or a hijacked mailbox. Lifting it then needs `passwordChangeAcknowledged: true`. Example: `false`

### Responses

#### 200 - The paused senders, one entry per sender, latest end first. The list is empty when nothing is paused.
```json
{
  "blocks": [
    {
      "id": "mrb_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "scope": "email",
      "value": "info@example.com",
      "category": "spam",
      "reason": "email ratio: 9/9 (100%) in 1440m; Cold bulk product listing to many recipients",
      "blockedUntil": "2026-10-09T18:00:00.000Z",
      "createdAt": "2026-10-09T06:00:00.000Z",
      "unblockPending": false,
      "selfUnblocksLeft": 3,
      "passwordChangeAcknowledgementRequired": false
    }
  ]
}
```

#### 400 - Invalid request. The response body is an RFC 7807 Problem Details document.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request is invalid.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 401 - Unauthorized. Authentication is required.
```json
{
  "type": "https://developer.hostup.se/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required.",
  "code": "unauthorized",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 403 - Forbidden. The caller lacks a required scope or does not own the resource.
```json
{
  "type": "https://developer.hostup.se/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "The caller lacks a required scope or does not own the resource.",
  "code": "forbidden",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 404 - `domain_not_found`: the domain is not on any of your web hosting accounts. `vps_not_found`: the VPS is not on your account.

#### 429 - Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Rate limit exceeded. Please try again later.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```
