curl --request POST \
--url https://api.voucher-staging.allride.io/partner/v1/email-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purpose": "redemption-link-otp",
"subject": {
"de": "Ihr Code: {{otpCode}}",
"en": "Your code: {{otpCode}}"
},
"htmlBody": {
"de": "<!doctype html><html><body><p>Ihr Code: {{otpCode}}</p><p>Gültig für {{expiresInMinutes}} Minuten.</p></body></html>",
"en": "<!doctype html><html><body><p>Your code: {{otpCode}}</p><p>Valid for {{expiresInMinutes}} minutes.</p></body></html>"
}
}
'{
"data": {
"id": 18030,
"resource": "email-template",
"purpose": "redemption-link-otp",
"subject": {
"de": "Ihr Code: {{otpCode}}",
"en": "Your code: {{otpCode}}"
},
"htmlBody": {
"de": "<!doctype html><html><body><p>Ihr Code: {{otpCode}}</p><p>Gültig für {{expiresInMinutes}} Minuten.</p></body></html>",
"en": "<!doctype html><html><body><p>Your code: {{otpCode}}</p><p>Valid for {{expiresInMinutes}} minutes.</p></body></html>"
},
"textBody": null,
"sourceMjml": null,
"status": "draft",
"isSeeded": false,
"validation": {
"missingRequired": [],
"unknownVariables": [],
"htmlFindings": [],
"renderedOk": true
},
"valid": true,
"createdAt": "2026-10-22T09:20:00Z",
"updatedAt": "2026-10-22T09:20:00Z",
"_links": {
"self": {
"href": "https://api.voucher.allride.io/partner/v1/email-templates/18030",
"type": "application/json"
},
"preview": {
"href": "https://api.voucher.allride.io/partner/v1/email-templates/18030/preview",
"type": "application/json"
}
}
}
}Create an email template
Creates a draft template, either uploaded (subject, htmlBody, …) or generated from your Workspace Branding (generateFromBranding: true). Validation runs immediately and is stored in validation; an invalid draft is still saved. Only forbidden constructs and oversized sources are refused with 422 template-invalid. See Email OTP links.
Required permissions: manage-consumer-email · API keys: allowed
curl --request POST \
--url https://api.voucher-staging.allride.io/partner/v1/email-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purpose": "redemption-link-otp",
"subject": {
"de": "Ihr Code: {{otpCode}}",
"en": "Your code: {{otpCode}}"
},
"htmlBody": {
"de": "<!doctype html><html><body><p>Ihr Code: {{otpCode}}</p><p>Gültig für {{expiresInMinutes}} Minuten.</p></body></html>",
"en": "<!doctype html><html><body><p>Your code: {{otpCode}}</p><p>Valid for {{expiresInMinutes}} minutes.</p></body></html>"
}
}
'{
"data": {
"id": 18030,
"resource": "email-template",
"purpose": "redemption-link-otp",
"subject": {
"de": "Ihr Code: {{otpCode}}",
"en": "Your code: {{otpCode}}"
},
"htmlBody": {
"de": "<!doctype html><html><body><p>Ihr Code: {{otpCode}}</p><p>Gültig für {{expiresInMinutes}} Minuten.</p></body></html>",
"en": "<!doctype html><html><body><p>Your code: {{otpCode}}</p><p>Valid for {{expiresInMinutes}} minutes.</p></body></html>"
},
"textBody": null,
"sourceMjml": null,
"status": "draft",
"isSeeded": false,
"validation": {
"missingRequired": [],
"unknownVariables": [],
"htmlFindings": [],
"renderedOk": true
},
"valid": true,
"createdAt": "2026-10-22T09:20:00Z",
"updatedAt": "2026-10-22T09:20:00Z",
"_links": {
"self": {
"href": "https://api.voucher.allride.io/partner/v1/email-templates/18030",
"type": "application/json"
},
"preview": {
"href": "https://api.voucher.allride.io/partner/v1/email-templates/18030/preview",
"type": "application/json"
}
}
}
}Authorizations
Your API key in Authorization: Bearer <key>. Use vk_test_… keys against the sandbox and vk_live_… keys against production.
Headers
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.
1 - 255^[\x21-\x7E]{1,255}$Body
- Option 1
- Option 2
Exactly one variant: upload or generate.
Template purpose.
redemption-link-otp Subject per locale (at most 200 characters).
Show child attributes
Show child attributes
{
"de": "5 € Fahrguthaben",
"en": "€5 ride credit"
}
HTML per locale; must include your partner's default locale.
Show child attributes
Show child attributes
Text per locale.
Show child attributes
Show child attributes
MJML source per locale.
Show child attributes
Show child attributes
Response
Created
Single-object envelope around a EmailTemplate.
An OTP email template. Variables: required {{otpCode}}, {{expiresInMinutes}}; optional {{partnerName}}, {{logoUrl}}, {{primaryColor}}, {{supportEmail}}, {{linkName}}, {{locale}}. Helpers: if, unless, each only.
Show child attributes
Show child attributes