## POST /api/v2/me/mail-relay/blocks/unblock

**Lift a paused mail relay sender**

Lifts a pause the outbound mail relay put on one of your senders. Take `blockScope` and `blockValue` from `scope` and `value` of an entry in `GET /api/v2/me/mail-relay/blocks`. The relay still checks every message afterwards. A sender that keeps sending the same kind of mail is paused again, for longer. When the entry has `passwordChangeAcknowledgementRequired: true`, change the mailbox password first and send `passwordChangeAcknowledged: true`. You can lift a pause on the same sender 3 times in 7 days. The pause ends within a minute. Until then the entry shows `unblockPending: true`.

### Related Endpoints

- `GET /api/v2/me/mail-relay/blocks`: List paused mail relay senders
- `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): `write:hosting` (Only when `scope` is `hosting`.), `write:vm` (Only when `scope` is `vps`.)
- `Content-Type`: application/json

### Request Body

- `scope` (string, required): Where the sender lives, as on the list. `hosting` takes `domain` and needs the scope `write:hosting`. `vps` takes `vpsId` and needs `write:vm`. Example: `hosting`
  Allowed values: hosting, vps
- `domain` (string, optional): A domain on one of your web hosting accounts. Required when `scope` is `hosting`. Example: `example.com`
- `vpsId` (string, optional): The VPS ID (`vps_…`). Required when `scope` is `vps`. Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `blockScope` (string, required): The `scope` of the entry on the list. Example: `email`
  Allowed values: email, domain, envelope, ip
- `blockValue` (string, required): The `value` of the entry on the list, unchanged. Example: `info@example.com`
- `passwordChangeAcknowledged` (boolean, optional): Confirms that the mailbox password was changed. Required as `true` when the entry has `passwordChangeAcknowledgementRequired: true`. Example: `true`

### Request Examples

#### Lift a pause on a mailbox of a hosting domain

```bash
curl -X POST "https://cloud.hostup.se/api/v2/me/mail-relay/blocks/unblock" \
  -H "Authorization: Bearer $HOSTUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "hosting",
    "domain": "example.com",
    "blockScope": "email",
    "blockValue": "info@example.com",
    "passwordChangeAcknowledged": true
  }'
```

```json
{
  "scope": "hosting",
  "domain": "example.com",
  "blockScope": "email",
  "blockValue": "info@example.com",
  "passwordChangeAcknowledged": true
}
```

#### Lift a pause on a VPS address

```bash
curl -X POST "https://cloud.hostup.se/api/v2/me/mail-relay/blocks/unblock" \
  -H "Authorization: Bearer $HOSTUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "vps",
    "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "blockScope": "ip",
    "blockValue": "198.51.100.10"
  }'
```

```json
{
  "scope": "vps",
  "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "blockScope": "ip",
  "blockValue": "198.51.100.10"
}
```

### Response Schema

- `commandId` (string, required): ID of the queued lift. Example: `mru_0b8e5f0c-3c1a-4f7e-9d2b-6a5c4e3d2f10`
- `status` (string, required): Always `pending`. Example: `pending`
  Allowed values: pending
- `appliesWithinSeconds` (integer, required): The most seconds it takes until the sender can send again. Example: `60`

### Responses

#### 202 - The lift is queued. The pause ends within a minute.
```json
{
  "commandId": "mru_0b8e5f0c-3c1a-4f7e-9d2b-6a5c4e3d2f10",
  "status": "pending",
  "appliesWithinSeconds": 60
}
```

#### 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 body failed validation.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z",
  "errors": [
    {
      "pointer": "/scope",
      "detail": "`scope` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 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` or `vps_not_found`: the domain or VPS is not on your account. `mail_relay_block_not_found`: none of your active pauses matches `blockScope` and `blockValue`. The pause may already have ended.
```json
{
  "type": "https://developer.hostup.se/errors/mail_relay_block_not_found",
  "title": "Paused sender not found",
  "status": 404,
  "detail": "None of your active pauses matches this sender. The pause may already have ended.",
  "code": "mail_relay_block_not_found",
  "instance": "/api/v2/me/mail-relay/blocks/unblock",
  "requestId": "7f3e9c0a-2b1d-4e5f-8a6b-9c0d1e2f3a4b",
  "timestamp": "2026-10-09T10:00:00.000Z"
}
```

#### 409 - `unblock_pending`: a lift for this sender is already on its way. `password_change_acknowledgement_required`: the pause is for phishing, a scam, malware or a hijacked mailbox. Change the password, then send again with `passwordChangeAcknowledged: true`.
```json
{
  "type": "https://developer.hostup.se/errors/password_change_acknowledgement_required",
  "title": "Password change required",
  "status": 409,
  "detail": "This pause is for messages that looked like phishing, a scam or malware, which usually means someone outside has got hold of the mailbox password. Change the password, then lift the pause with `passwordChangeAcknowledged: true`.",
  "code": "password_change_acknowledgement_required",
  "instance": "/api/v2/me/mail-relay/blocks/unblock",
  "requestId": "7f3e9c0a-2b1d-4e5f-8a6b-9c0d1e2f3a4b",
  "timestamp": "2026-10-09T10:00:00.000Z",
  "errors": [
    {
      "pointer": "/passwordChangeAcknowledged",
      "detail": "Confirm that the mailbox password was changed.",
      "code": "password_change_acknowledgement_required"
    }
  ]
}
```

#### 429 - `unblock_limit_reached`: a pause on this sender was lifted 3 times in the last 7 days. Contact support to lift it again.
```json
{
  "type": "https://developer.hostup.se/errors/unblock_limit_reached",
  "title": "Unblock limit reached",
  "status": 429,
  "detail": "A pause on the same sender can be lifted 3 times in 7 days. Contact support to lift it again.",
  "code": "unblock_limit_reached",
  "instance": "/api/v2/me/mail-relay/blocks/unblock",
  "requestId": "7f3e9c0a-2b1d-4e5f-8a6b-9c0d1e2f3a4b",
  "timestamp": "2026-10-09T10:00:00.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"
}
```
