BizKitHub
DocsAPI explorerEmailer/api/v1/emailer/send
postEmailerPublic API v1

/api/v1/emailer/send

Queues or immediately sends an email through the organisation mail system. Content is either a ready htmlBody + subject, or templateCode + variables of a template the organisation manages in admin (BIZKIT-125). Supports attachments (from blob storage, URL, or raw text), priority control and linking to an order (orderHash). Every e-mail appears in the recipient contact history in admin.

emailerpostApiV1EmailerSend

Parameters

1 query · JSON body

Query parameters

· 1
apiKeystringRequired

Your BizKitHub API key (passed as GET parameter).

Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more

ExamplePRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Request body

application/json
subjectstringOptional

Email subject line. Required with htmlBody; ignored with templateCode (the template has its own).

ExampleOrder confirmation #12345
fromstringOptional

Sender email address or name+email. If omitted, organisation default is used.

tostringRequired

Recipient email address.

ccstringOptional

CC recipient email address.

bccstringOptional

BCC recipient email address.

replyTostringOptional

Reply-To email address.

prioritynumberOptional

Email priority (lower = higher priority). Default queue priority if omitted.

Examples1510
notestringOptional

Internal note attached to the email record (not sent to recipient).

htmlBodystringOptional

HTML content of the email body. Send either htmlBody (with subject) or templateCode.

templateCodestringOptional

Code of the organisation's own template: admin → E-maily → Šablony, type "Vlastní e-mail (odesílaný přes API)", field "variant". The template language follows locale (falls back to another language of the same code). Subject and body are rendered from the template; sending fails (nothing is sent) when the template does not exist or is inactive, or when a {{ placeholder }} has no value.

Length: 1–64
Examplewin-back
variablesobjectOptional

Values for {{ name }} placeholders of the template. Names: letters and digits, starting with a letter. Values are HTML-escaped, except names ending in Html (ready-made HTML, e.g. badgesHtml). Organisation variables (e.g. organisationName) are always available; with orderHash also order variables (orderNumber, orderPrice, payLink, orderPageLink, …).

Example{"firstName":"Jana","lastVisitDate":"12. 11. 2026"}
localestringOptional

Communication locale code — controls the language of textual data (product names, descriptions, articles, storefront UI, transactional e-mails).

Preferred format: BCP 47 language tag — language[-Script][-REGION]. Use the full tag whenever the script or region matters:

  • en-GB vs. en-US (British vs. American spelling)
  • pt-PT vs. pt-BR (European vs. Brazilian Portuguese)
  • zh-Hans vs. zh-Hant (Simplified vs. Traditional Chinese)
  • sr-Latn vs. sr-Cyrl (Latin vs. Cyrillic Serbian)

Backwards-compatible fallback: the bare two-letter ISO 639-1 code (cs, en, pl, …) is accepted indefinitely — legacy clients that only send the language subtag continue to work unchanged.

Resolution algorithm (server-side): the input is resolved against the supported locale list via the [RFC 4647 Lookup] progressive-fallback strategy — trailing subtags are stripped one by one until a supported locale is found. Example: en-GB-oxendict → en-GB → en (matched). If no subtag combination is supported, the request is rejected.

Currently supported locales: cs, en, fr, it, pl, de, sk, sv, es, zh, ja, uk, da, hu, ro, nl, pt, fi, nb, hr. Region-specific variants (e.g. en-GB, pt-BR) are accepted and resolved to their base language when the exact variant is not registered separately.

Length: 2–35
Examplescsenen-GBpt-BRzh-Hans
orderHashstringOptional

Order the e-mail is about (hash from POST /shop/order/create). The e-mail then appears in the order detail in admin; with templateCode order variables are available. The tag is kept in the internal note.

ExamplesSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
tagstringOptional

Tag for categorizing the email (e.g. for analytics).

Examplesorder-confirmationnewsletter
forceSendNowbooleanOptional

If true, send immediately bypassing the queue. Default: false.

attachmentListobject | object | object[]Optional

List of attachments. Each item is one of blobToken, attachmentUrl, or rawTextContent.

Each array item:
object | object | object
One of 3:
Variant 1
blobTokenstringRequired

Token of a file stored in blob storage.

Variant 2
attachmentUrlstringRequired

Public URL of the file to attach.

Variant 3
rawTextContentstringRequired

Raw text content to attach as a file.

Response schema

1 documented status code

200Success
success"true"Required

Response example

application/json
{
  "success": true
}

Request example

POST /api/v1/emailer/send

post
curl -X POST "https://api.bizkithub.com/api/v1/emailer/send?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "subject": "Order confirmation #12345",
  "from": "[email protected]",
  "to": "[email protected]",
  "cc": "example_cc",
  "bcc": "example_bcc",
  "replyTo": "example_replyTo",
  "priority": 1,
  "note": "example_note",
  "htmlBody": "example_htmlBody",
  "templateCode": "win-back",
  "variables": {
    "firstName": "Jana",
    "lastVisitDate": "12. 11. 2026"
  },
  "locale": "cs",
  "orderHash": "sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
  "tag": "order-confirmation",
  "forceSendNow": false,
  "attachmentList": []
}'

Need an API key?

Every public BizKitHub API endpoint authenticates with an API key.

Get an API key