# Mail an Bewerbende vorschauen

`POST https://{tenant}.stamp.eu/rest/recruiting/applications/{application}/mails/preview`

Rendered subject and body of a
template (or of the text HR edited) for this application. Writes nothing. 409
`application_purged` for purged applications, 422 for unknown placeholders

## Pfadparameter

| Name | Typ | Pflicht |
| --- | --- | --- |
| `application` | string | ja |

## Request-Body

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `template` | `rejection`, `invitation` | ja | Mail templates of the recruiting pipeline (OpenSpec add-recruiting, D11 Stufe 2, task 9.1): the rejection and the invitation, each a tenant setting with a default text per tenant language. |
| `subject` | string \| null | nein |  |
| `body` | string \| null | nein |  |

## Antworten

### 200: `JobApplicationMailPreviewResource`

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `data` | object | ja |  |
| `data.template` | `rejection`, `invitation` | ja | Mail templates of the recruiting pipeline (OpenSpec add-recruiting, D11 Stufe 2, task 9.1): the rejection and the invitation, each a tenant setting with a default text per tenant language. |
| `data.subject` | string | ja |  |
| `data.body` | string | ja |  |

### 401: Unauthenticated

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Error overview. |

### 422: Validation error

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Errors overview. |
| `errors` | object | ja | A detailed description of each field that failed validation. |
