# PUBLIC_EMAILER_BODY_REQUIRED: Send either htmlBody (with subject) or templateCode.

- Category: Public API
- HTTP status: 400
- Reference: https://docs.bizkithub.com/en/errors/PUBLIC_EMAILER_BODY_REQUIRED

## What happened

`POST /emailer/send` needs exactly one source of content: a ready `htmlBody` with `subject`, or `templateCode` of the organisation's own template written in admin.

## How to resolve

1. Remove `htmlBody` when sending by `templateCode`.
2. Send `subject` together with `htmlBody`.

## Example response

```json
{
  "state": "error",
  "code": 400,
  "message": "Send either htmlBody (with subject) or templateCode.",
  "errorCode": "PUBLIC_EMAILER_BODY_REQUIRED",
  "hint": "`POST /emailer/send` needs exactly one source of content: a ready `htmlBody` with `subject`, or `templateCode` of the organisation's own template written in admin.",
  "documentationUrl": "https://docs.bizkithub.com/errors/PUBLIC_EMAILER_BODY_REQUIRED"
}
```
