Changelog

Send multiple emails at once with batch email

Published on:

With the new /send/batch endpoint, you can send multiple emails in a single API request. Useful when your application generates multiple emails at once, for example after processing an import or when handling a queue.

What is batch email?

Instead of making a separate request for each email, you bundle them and send everything at once. You send an array with up to 500 emails to Lettermint's /send/batch endpoint.

Batch email can be used in different ways. Send completely unique emails with different recipients, subjects and content. Or send the same email to multiple recipients at once, like a newsletter.

This way you avoid sending hundreds of separate requests to our API in a short time. No more long loops sending emails one by one. Instead, you bundle everything and send it in a single request.

How does it work?

The batch endpoint supports the same options as our standard /send endpoint for transactional emails. So you can work with attachments, tags, routes and all other features you're used to.

An example with curl:

          curl --request POST \
  --url https://api.lettermint.co/v1/send/batch \
  --header 'x-lettermint-token: your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "messages": [
      {
        "from": "shop@example.com",
        "to": "customer1@example.com",
        "subject": "Your order is ready",
        "html": "Your order has been shipped."
      },
      {
        "from": "shop@example.com",
        "to": "customer2@example.com",
        "subject": "Your order is ready",
        "html": "Your order has been shipped."
      }
    ]
  }'

        

You'll receive a response with a message_id for each email. Use this to track the status of each email via the dashboard or via webhooks.

Availability

The batch endpoint is available for all users, including our free plan. You can send up to 500 emails per request with a maximum payload of 25MB. This includes any attachments. Works for both transactional emails and broadcast emails.

Sending more than 500 emails? Split them into multiple batch requests. Check out the full documentation at docs.lettermint.co.