# Send a test email

`POST https://api.cademi.com.br/api/v3/settings/emails/templates/{email_template_id}/test-messages`

Operation ID: `settings.emails.templates.test_messages.create` · API v3

Sends a test email using the template. The recipient in `to` must be the email address of an active administrator of the account or the configured sender address (`sender.address`).

The email is sent asynchronously. The response contains the operation that tracks the delivery, and the `Location` header contains its URL.

Required permissions: `settings.send_test_email`.

## Parameters

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

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `to` | string (email) | yes |  |

## Responses

### 202

The test email was accepted for asynchronous delivery. Returns the operation that tracks it.

Body: `data`: Operation.

Fields of Operation:

| Field | Type | Required | Description |
|---|---|---|---|
| `attempt` | object or null | yes |  |
| `cancellation_requested` | boolean | yes |  |
| `created_at` | string (date-time) | yes |  |
| `error` | object or null | yes |  |
| `expires_at` | string (date-time) | yes |  |
| `finished_at` | string or null (date-time) | yes |  |
| `id` | string | yes | Public ID, with the op_ prefix. |
| `items_url` | string | yes |  |
| `object` | string, one of `operation` | yes |  |
| `progress` | object | yes |  |
| `result_url` | string or null | yes |  |
| `started_at` | string or null (date-time) | yes |  |
| `status` | string, one of `queued`, `running`, `succeeded`, `partially_succeeded`, `failed`, `canceled` | yes |  |
| `type` | string | yes | Type of the operation, from a fixed set of values. |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The template key is not part of the email template catalog.

Body: Error.

### 409

Email sending is disabled for the account, or the sending limit for the current period has been reached.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
