# Mailvorlagen ändern

`PUT https://{tenant}.stamp.eu/rest/recruiting/settings/mail-templates`

Per template an own text or null (default).
422 with field errors for unknown placeholders

## Request-Body

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `rejection` | object | nein |
| `rejection.subject` | string | nein |
| `rejection.body` | string | nein |
| `invitation` | object | nein |
| `invitation.subject` | string | nein |
| `invitation.body` | string | nein |

## Antworten

### 200: `RecruitingMailTemplatesResource`

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `data` | object | ja |  |
| `data.placeholders` | string[] | ja |  |
| `data.templates` | object[] | ja |  |
| `data.templates[].key` | `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.templates[].subject` | string | ja |  |
| `data.templates[].body` | string | ja |  |
| `data.templates[].is_default` | boolean | ja |  |
| `data.templates[].default_subject` | string | ja |  |
| `data.templates[].default_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. |
