Send Email + PDF in One API Call

Stop stitching together SendGrid and DocRaptor.
Create email and PDF templates. Send with dynamically generated attachments in one API call.

// The FormaMail way: Email + PDF Invoice in one call
const response = await fetch('https://api.formamail.com/api/emails/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    templateId: "order-confirmation",
    to: [{ email: "customer@example.com", name: "John Doe" }],
    variables: {
      orderId: "12345",
      customerName: "John Doe",
      items: [{ name: "Widget", qty: 2, price: 29.99 }],
      total: 59.98
    },
    attachments: [{
      attachmentTemplateId: "invoice-pdf"
    }]
  })
});
 
// That's it. Email sent with PDF invoice attached.

Why FormaMail?

1

One API Call

Send email + generate PDF + attach file. All in a single POST request.

1

Same Visual Designer

Design email, PDF, and Excel templates with the same intuitive drag-and-drop editor.

1

Visual Designer

Design email and PDF templates in the same drag-and-drop editor.

Explore Documentation