MiN8T All Insights

On This Page

  1. Export to HTML
  2. Export to ESP
  3. Response Fields
  4. Next Steps
Guide5 min read

Export Emails via API

M
MiN8T Team
Email Engineering
April 12, 2026

1 Export to HTML

Export any template to HTML programmatically:

POST /api/v1/export/html
Content-Type: application/json
MiN8T-Api-Auth: your-api-key

{
  "template_id": "clx7abc...",
  "include_amp": true
}

The export pipeline:

  1. Fetches the template and serializes it to email-safe HTML
  2. If include_amp is true and the template has AMP blocks, generates AMP HTML
  3. Runs AMP validation (DOCTYPE, boilerplate, size limits, forbidden content, component scripts)
  4. Generates plain text version
  5. Assembles 3-part MIME (text/plain + text/x-amp-html + text/html)

2 Export to ESP

Upload the template directly to a connected ESP (Brevo, Mailchimp, SendGrid, etc.):

POST /api/v1/export/:espSlug/template
Content-Type: application/json
MiN8T-Api-Auth: your-api-key

{
  "template_id": "clx7abc...",
  "connection_id": "conn_xyz...",
  "list_id": "list_123",
  "include_amp": true
}

MiN8T:

  1. Generates the HTML (and AMP HTML if requested)
  2. Retrieves the ESP connection credentials for your account
  3. Uploads the template to the ESP via their API
  4. Returns the ESP's template ID and upload status
i

The ESP slug is the lowercase name of the provider (e.g., brevo, mailchimp, sendgrid). You must have an active connection configured in the Integrations dashboard.

3 Response Fields

{
  "success": true,
  "data": {
    "html": "<!DOCTYPE html>...</html>",
    "amp_html": "<!doctype html><html amp4email>...</html>",
    "amp_validation": {
      "valid": true,
      "errors": [],
      "warnings": ["CSS size: 12KB of 75KB limit"]
    },
    "mime": "Content-Type: multipart/alternative...",
    "plain_text": "Your email in plain text..."
  }
}

Key fields:

  • html, the final email HTML, ready to send
  • amp_html, the AMP4Email document (only present if include_amp was true and AMP blocks exist)
  • amp_validation, validation results with errors and warnings
  • mime, the complete 3-part MIME message (ready for direct SMTP sending)
  • plain_text, auto-generated text-only version
✓

The mime field gives you a complete, ready-to-send email. Pass it directly to any SMTP library (Nodemailer, Python smtplib, etc.) without any additional assembly.

4 Next Steps

  • Canonical JSON API, generate personalized emails with data before exporting
  • How to Export AMP HTML Emails, detailed AMP export workflow
  • How to Test and Export AMP Emails, test before you send

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