Skip to main content
POST

Authorizations

Authorization
string
header
required

Your API key in Authorization: Bearer <key>. Use vk_test_… keys against the sandbox and vk_live_… keys against production.

Headers

Idempotency-Key
string

Optional key (1-255 printable ASCII characters, no spaces; a UUID is ideal) that makes this POST safe to retry: the same key with the same request replays the stored response for 24 hours. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]{1,255}$

Body

application/json

Exactly one variant: upload or generate.

purpose
enum<string>
required

Template purpose.

Available options:
redemption-link-otp
subject
object
required

Subject per locale (at most 200 characters).

Example:
htmlBody
object
required

HTML per locale; must include your partner's default locale.

textBody
object | null

Text per locale.

sourceMjml
object | null

MJML source per locale.

Response

Created

Single-object envelope around a EmailTemplate.

data
object
required

An OTP email template. Variables: required {{otpCode}}, {{expiresInMinutes}}; optional {{partnerName}}, {{logoUrl}}, {{primaryColor}}, {{supportEmail}}, {{linkName}}, {{locale}}. Helpers: if, unless, each only.