MiN8T All Insights

On This Page

  1. What is the Canonical JSON API?
  2. The Generate Endpoint
  3. How It Works
  4. Response Format
  5. Next Steps
Guide6 min read

Canonical JSON API: Create Emails Programmatically

M
MiN8T Team
Email Engineering
April 12, 2026

1 What is the Canonical JSON API?

The Canonical JSON API lets you generate personalized, ready-to-send emails programmatically. You design a template with Smart Elements in the editor, then call the API with data to produce final HTML, no visual editor needed at send time.

This is how you'd integrate MiN8T into your own application or CI/CD pipeline: design the template once, then generate thousands of personalized variants via API.

Key capabilities:

  • Smart Element population, pass items to fill Smart Element containers
  • Variable replacement, replace {{variable}} placeholders with actual values
  • Element duplication. Smart Element containers are cloned for each item in your data array
  • AMP generation, produces both HTML and AMP HTML if the template uses AMP blocks

2 The Generate Endpoint

POST /api/v1/templates/:id/generate
Content-Type: application/json
MiN8T-Api-Auth: your-api-key

{
  "items": [
    {
      "title": "Samsung Galaxy Note 10",
      "price": "$999.99",
      "imgUrl": "https://cdn.shop.com/samsung.jpg",
      "url": "https://shop.com/samsung"
    },
    {
      "title": "iPhone 15 Pro",
      "price": "$1,199.99",
      "imgUrl": "https://cdn.shop.com/iphone.jpg",
      "url": "https://shop.com/iphone"
    }
  ]
}

Authentication: MiN8T-Api-Auth header with your account API key.

Limits: Maximum 50 items per request. Items array is required and must contain at least one item.

3 How It Works

  1. Finds Smart Elements, scans the template hierarchy for containers, structures, or stripes with smartElement.enabled = true (checks both top-level and metadata.smart_element paths)
  2. Clones per item, for each item in the items array, the Smart Element container is deep-cloned
  3. Replaces variables, within each clone, {{fieldName}} placeholders in text blocks, image URLs, and button links are replaced with actual values from the item
  4. Generates HTML, the populated template is serialized to email-safe HTML
  5. Generates AMP HTML (optional), if the template contains AMP blocks, AMP output is also generated
i

The API works with any template that has Smart Elements. Design a product card template with {{title}}, {{price}}, {{imgUrl}} variables, then pass different products at send time to generate unique emails for each recipient or segment.

4 Response Format

{
  "success": true,
  "data": {
    "html": "<!DOCTYPE html><html>...</html>",
    "amp_html": "<!doctype html><html amp4email>...</html>",
    "smart_elements_found": 1,
    "items_processed": 2
  }
}

The response includes the fully generated HTML, optional AMP HTML, and metadata about the generation (how many Smart Elements were found and items processed).

!

If the template has no Smart Elements, the API returns the template HTML as-is without variable replacement. Ensure your template has at least one Smart Element with enabled configuration.

5 Next Steps

  • What are Smart Elements?, design templates with data connections
  • What are Data Sources?, alternative to API for dynamic AMP content

Last updated: April 2026. All details verified against MiN8T's actual codebase implementation.

Ready to start?

Stay up to date - the latest on email design and deliverability.

Let's get you building. Start your free account today.

MiN8T

108+ ESP integrations. Built-in deliverability. AI-powered design. Try MiN8T free today.

MiN8T

The email marketing operations platform.
Replace Stripo, ZeroBounce, BeeFree, Litmus,
and 4 more tools.
Inbox guaranteed across 108+ ESPs.

Product

  • API
  • Pricing
  • Integrations
  • How it works
  • Testimonials

Resources

  • Blog
  • Insights & Guides
  • Documentation
  • API Reference
  • DeliverIQ Docs
  • Deliverability Guide

Company

  • Contact
  • Support
  • Talk to Sales

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
© 2026 MiN8T. All rights reserved. Powered by ABLA.
Trusted by 1,000+ teams 108+ ESP Integrations SOC 2 Compliant GDPR Ready