## POST /api/v2/support/port25-requests

**Request Port 25 unblock for a VPS**

Submit an outbound SMTP Port 25 unblock request for one VPS owned by the caller. The account must satisfy abuse-prevention requirements before the request is accepted: BankID verification or an annual-or-longer prepaid VPS term. `reason` is required because support review uses it when automatic approval is not available.

### Related Endpoints

- `GET /api/v2/support/tickets`: List support tickets
- `POST /api/v2/support/tickets`: Create support ticket
- `POST /api/v2/support/attachments`: Upload support attachment

### Headers

- `Accept`: application/json
- `Authorization`: Bearer YOUR_API_KEY
- Required API scope: `write:support`
- `Content-Type`: application/json

### Request Body

- `vpsId` (string, required): Public VPS ID from `GET /api/v2/vps` `data[].id`. Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `reason` (string, required): Customer-facing explanation of how outbound SMTP will be used. Example: `We send transactional email for example.com from authenticated users with bounce handling and abuse monitoring.`

### Request Examples

#### Request Port 25 unblock

```bash
curl -X POST "https://cloud.hostup.se/api/v2/support/port25-requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "reason": "We send transactional email for example.com from authenticated users with bounce handling and abuse monitoring."
  }'
```

```json
{
  "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "reason": "We send transactional email for example.com from authenticated users with bounce handling and abuse monitoring."
}
```

### Response Schema

- `id` (string, required) Example: `p25_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `vpsId` (string,null, required) Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `vpsName` (string,null, required) Example: `mail.example.com`
- `ipAddress` (string, required) Example: `203.0.113.10`
- `status` (string, required) Example: `pending`
  Allowed values: pending, approved, rejected, unknown
- `reason` (string,null, required) Example: `We send transactional email for example.com from authenticated users with bounce handling and abuse monitoring.`
- `requestedAt` (string,null, required) Example: `2026-06-03T03:25:00.000Z`
- `resolvedAt` (string,null, required) Example: `null`

### Responses

#### 201 - Port 25 request accepted.
```json
{
  "id": "p25_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "vpsName": "mail.example.com",
  "ipAddress": "203.0.113.10",
  "status": "pending",
  "reason": "We send transactional email for example.com from authenticated users with bounce handling and abuse monitoring.",
  "requestedAt": "2026-06-03T03:25:00.000Z",
  "resolvedAt": null
}
```

#### 400 - The request body is invalid or missing required fields.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "`reason` is required.",
  "code": "invalid_request",
  "instance": "/api/v2/support/port25-requests",
  "errors": [
    {
      "pointer": "/reason",
      "detail": "`reason` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 401 - Authentication is required.
```json
{
  "type": "https://developer.hostup.se/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required.",
  "code": "unauthorized",
  "instance": "/api/v2/support/port25-requests"
}
```

#### 403 - The account does not yet meet the abuse-prevention requirements for Port 25 requests.
```json
{
  "type": "https://developer.hostup.se/errors/port25_requirements_not_met",
  "title": "Port 25 requirements not met",
  "status": 403,
  "detail": "Port 25 requests require BankID verification or a VPS prepaid on annual billing.",
  "code": "port25_requirements_not_met",
  "instance": "/api/v2/support/port25-requests"
}
```

#### 404 - The requested VPS was not found or is not accessible.
```json
{
  "type": "https://developer.hostup.se/errors/vps_not_found",
  "title": "VPS not found",
  "status": 404,
  "detail": "The requested VPS could not be found.",
  "code": "vps_not_found",
  "instance": "/api/v2/support/port25-requests"
}
```

#### 409 - A Port 25 request for this VPS/IP is already pending review.
```json
{
  "type": "https://developer.hostup.se/errors/port25_request_pending",
  "title": "Port 25 request already pending",
  "status": 409,
  "detail": "A port 25 request for this IP is already pending review.",
  "code": "port25_request_pending",
  "instance": "/api/v2/support/port25-requests"
}
```

#### 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": "Too many requests. Retry after the limit resets.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Unexpected error while submitting the Port 25 request.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred.",
  "code": "internal_error",
  "instance": "/api/v2/support/port25-requests"
}
```
