BizKitHub
PUBLIC_EMAILER_BODY_REQUIRED

Send either htmlBody (with subject) or templateCode.

From BizKitHub Docs, the API error code reference

HTTP 400Public API
`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. 1

    Remove `htmlBody` when sending by `templateCode`.

  2. 2

    Send `subject` together with `htmlBody`.

Example response

The API answers with HTTP 400 and a JSON body. Match on errorCode, not on message. Messages may be reworded, codes are stable.

application/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"
}