## Draft of a mail to the callback's contact (desk:write)

`GET /api/desk/v1/callbacks/{id}/customer-mail`

Module: Desk · operationId: `getCallbackCustomerMail` · Tag: Callbacks · Auth: access token (`Authorization: Bearer <accessToken>`)

The text of the callback's current status (`settings.callbacks.statusMail`), else the first mail text, rendered
for the callback (`mode` is `manual`), with the contact's address in `to` or the reason in `missing`. The
recipient is the contact's e-mail address in masterdata. Without any mail text: 404 `no_mail_text`.

### Parameters

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

### Responses

- **200** Draft (`application/json`)
- **404** not_found or no_mail_text (the tenant has no mail text) (`application/json`)

Fields of the 200 answer:

- `body` (string, required): Placeholders filled
- `mode` (string, required): Mode of the status mail; the draft route always answers manual (one of `manual`, `auto`)
- `subject` (string, required): Placeholders filled
- `text` (string, required): Key of the mail text
- `textName` (string, required): Name of the mail text the draft was made from
- `to` (string, required): The contact's e-mail address; "" when there is none (see `missing`)
- `missing` (string): Why there is no recipient or no mail: `no_contact` (the callback has no contact), `no_address` (the contact is gone, inactive, blocked or has no valid address), `masterdata_unavailable` (masterdata could not be asked), `mail_unavailable` (mail is not set up). Absent when the mail can go out. (one of `no_contact`, `no_address`, `masterdata_unavailable`, `mail_unavailable`)

Example 200 answer:

```json
{
  "body": "Guten Tag Frau Stadler,\n\nwir haben heute versucht, Sie zurückzurufen, Sie aber leider nicht erreicht. Wir melden uns morgen wieder.\n\nViele Grüße\nElias Gruber",
  "mode": "manual",
  "subject": "Ihr Rückrufwunsch bei Muster IT",
  "text": "nicht-erreicht",
  "textName": "Nicht erreicht",
  "to": "katrin.stadler@alpenhotel-seeblick.example"
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/desk/v1/callbacks/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/customer-mail' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
