## POST /api/v2/me/email-deliverability/actions/send-test

**Send a test e-mail to the account address**

Send a test e-mail to the account address to check that e-mail from Hostup arrives. If sending to the address is blocked after an earlier bounce, the block is lifted first. That happens at most once every 30 days per address. An address reported as spam is never unblocked this way. Change the address instead.

One test per address every 10 minutes. Another test within that time returns `429 rate_limited` with `retryAfterSeconds`. Send no body. Follow the result with `GET /api/v2/me/email-deliverability`. `lastTest.delivered` turns `true` or `false` when the receiving mail server has answered.

### Related Endpoints

- `POST /api/v2/me/email-deliverability/actions/dismiss`: Close the account e-mail notice
- `GET /api/v2/me/email-deliverability`: Check e-mail delivery to your account address
- `GET /api/v2/me`: Get your account

### Headers

- `Authorization`: Bearer $HOSTUP_API_KEY
- Scope: `write:account`

### Request Example

```bash
curl -X POST "https://cloud.hostup.se/api/v2/me/email-deliverability/actions/send-test" \
  -H "Authorization: Bearer $HOSTUP_API_KEY" \
  -H "Content-Type: application/json"
```

### Response Schema

- `test` (object, required): The test e-mail that was sent.
- `test.queuedAt` (string, required): When the test e-mail was sent.
- `test.suppressionLifted` (boolean, required): `true` when a block after an earlier bounce was lifted first.
- `deliverability` (object, required): The delivery status after the test was sent, the same shape as `GET /api/v2/me/email-deliverability`.

### Responses

#### 200 - Test e-mail sent.
```json
{
  "test": {
    "queuedAt": "2026-08-21T12:30:00.000Z",
    "suppressionLifted": true
  },
  "deliverability": {
    "email": "info@example.se",
    "status": "suppressed",
    "reason": "Email to info@example.se is not being delivered right now because an earlier message bounced (last on 2026-08-21). Invoices, renewal warnings and ticket replies do not reach this address until this is fixed. Sending a test email from the account page restarts delivery (and confirms the address works); otherwise change the account email.",
    "lastBounceAt": "2026-08-21T08:35:49.000Z",
    "lastBounceKind": "suppression",
    "lastDeliveredAt": null,
    "lastTest": {
      "sentAt": "2026-08-21T12:30:00.000Z",
      "delivered": null
    },
    "uiShouldShow": true,
    "domainNotice": null,
    "actions": {
      "canSendTest": {
        "allowed": true,
        "reason": null
      },
      "canChangeEmail": {
        "allowed": true,
        "reason": null
      },
      "canDismiss": {
        "allowed": false,
        "reason": "This notice stays until email reaches the account address again."
      }
    }
  }
}
```

#### 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 - Authentication is required.

#### 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 - Not found. The resource does not exist or is not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/not_found",
  "title": "Not found",
  "status": 404,
  "detail": "The requested resource could not be found.",
  "code": "not_found",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 409 - No test can be sent to this address, for example because mail to it was reported as spam (`not_allowed`).

#### 429 - A test was sent to this address within the last 10 minutes (`rate_limited`). `retryAfterSeconds` says when to try again.

#### 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"
}
```

#### 502 - The test e-mail could not be sent right now (`send_failed`). Try again in a few minutes.

#### 503 - The account e-mail address could not be loaded right now (`upstream_unavailable`). Try again shortly.
