Email templates
Send branded emails by referencing a template, a design and your brand; Deliver builds the subject, HTML and plain text.
Send template: { slug, design }, brand and data. Deliver builds the subject, the HTML and the plain text with your brand’s logo, colors and legal details. See them live in the template gallery.
Templates
slug | Description (from the catalog) |
|---|---|
factura-electronica | Factura, nota crédito o nota débito con total, datos DIAN y aviso del ZIP adjunto. |
codigo-otp | Código grande y legible, vigencia, datos del intento y aviso de seguridad. |
GET /v1/templates returns the available templates with their designs and a sample data. If data is missing a field the template needs, the API answers 422 with VARIABLES_FALTANTES.
Designs
Designs: clasico (Clásico), moderno (Moderno), minimal (Minimal). The default is moderno.
Brand
The brand (brand) is registered by Piensa IT for your company, and it defines which applications may use it. The default is piensa-it. An unknown brand, or one your application isn’t authorized for, answers 404 with MARCA_NO_ENCONTRADA.
Overriding and attachments
With a template, content can override subject, fromName and replyTo, and add attachments (up to 10, 10 MB in total once decoded, in base64 without a data: prefix). The sender address is set by Deliver; you choose the visible name.
{
"channel": "email",
"to": [
"compras@cliente.com"
],
"template": {
"slug": "factura-electronica",
"design": "moderno"
},
"brand": "sudivisa",
"data": {
"tipoDocumento": "factura",
"numero": "SETP990000123",
"fechaEmision": "14 de septiembre de 2026",
"fechaVencimiento": "14 de octubre de 2026",
"cliente": {
"nombre": "Laura Gómez"
},
"total": "$ 1.250.000",
"resumen": [
{
"etiqueta": "Subtotal",
"valor": "$ 1.050.420"
},
{
"etiqueta": "IVA 19 %",
"valor": "$ 199.580"
},
{
"etiqueta": "Forma de pago",
"valor": "Crédito 30 días"
}
],
"cufe": "a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f6071829",
"nombreAdjunto": "z09001234560002600000123.zip"
},
"content": {
"attachments": [
{
"filename": "z09001234560002600000123.zip",
"content": "UEsDBBQAAAAIA…(base64)"
}
]
},
"idempotencyKey": "midivisa:factura:SETP990000123"
}