BizKitHub
DocsAPI ReferenceEmailer/bff/emailer/template-url-attachment-save
postEmailerAdmin BFF

/bff/emailer/template-url-attachment-save

When an e-mail of this type is sent, the address is filled with the e-mail variables, the file is downloaded (HTTPS, public host, max 15 MB, 15 s timeout, 2 attempts) and attached. If it cannot be downloaded, the e-mail is sent without it and a warning EML_URLATT_FAIL is logged.

EmailerpostBffEmailerTemplate-url-attachment-save

Parameters

JSON body

Request body

application/json
idnumberOptional

Existing attachment id; omit to add a new one.

typeCodestringRequired
Examplevoucher-gift-created
urlTemplatestringRequired

HTTPS address of the file. May use the variables of the e-mail type in the path and query, e.g. https://gymroom.cz/api/v1/voucher/pdf?code={{ voucherCode }}. Values are URL-encoded; the host must be fixed.

Length: 0–2000
filenameTemplatestring | nullOptional
One of 2:
Variant 1
string

Attachment file name, may use variables. Empty = name sent by the server or taken from the URL.

Length: 0–255
ExampleDarkovy poukaz {{ voucherCode }}.pdf
Variant 2
null
isActivebooleanOptional

Response schema

1 status code documented

200Success

This response returns no JSON body.

Response example

application/json
{
  "success": true
}

Request example

POST /bff/emailer/template-url-attachment-save

post
curl -X POST "https://api.bizkithub.com/bff/emailer/template-url-attachment-save" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "id": 0,
  "typeCode": "voucher-gift-created",
  "urlTemplate": "example_urlTemplate",
  "isActive": false
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key