# Send one test message through an application's mail server

> Send one test message through an application's mail server: CustomDomain™ API reference. Covers request parameters, the request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/applications/testEmailSender

## `POST https://api.customdomain.ai/v1/applications/{id}/email-sender:test`

Sends a short test message to `to` through the saved SMTP server (`mode` must be `smtp`). On success `verified_at` is recorded; on failure `last_error` is recorded (with no secret in it) and the response is 502. Limited to 5 per hour per application. Requires `app:write`.

### Authentication

`apiKey`, `managementKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `to` | string | yes | A plain email address. |

### Responses

| Status | Description |
| --- | --- |
| `200` | Sent. |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `403` | Error envelope: {code, title, details, request_id}. |
| `404` | Error envelope: {code, title, details, request_id}. |
| `409` | Error envelope: {code, title, details, request_id}. |
| `429` | Error envelope: {code, title, details, request_id}. |
| `502` | Error envelope: {code, title, details, request_id}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ok` | boolean | yes |  |
| `verified_at` | string | yes |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
