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 filledmode(string, required): Mode of the status mail; the draft route always answers manual (one ofmanual,auto)subject(string, required): Placeholders filledtext(string, required): Key of the mail texttextName(string, required): Name of the mail text the draft was made fromto(string, required): The contact's e-mail address; "" when there is none (seemissing)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 ofno_contact,no_address,masterdata_unavailable,mail_unavailable)
Example 200 answer:
{
"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
curl -X GET 'https://api.mbcom.cloud/api/desk/v1/callbacks/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/customer-mail' \
-H "Authorization: Bearer $ACCESS_TOKEN"