> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Sending

> Send up to 100 customized emails in a single API call.

# Batch Sending

Batch sending lets you dispatch up to **100 emails in a single API request**.

This is optimal for:

* Sending unique transactional messages (e.g. customized receipts or shipping updates) to multiple recipients in parallel.
* Dramatically reducing HTTP round-trip latency and network overhead.

***

## Endpoint

```http theme={null}
POST https://api.mailofly.com/api/emails/batch
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json
```

***

## Code Example

```typescript theme={null}
import { Mailofly } from "mailofly";

const mailofly = new Mailofly("mfly_live_your_api_key");

const { data, error } = await mailofly.batch.send([
  {
    from: "Acme <receipts@acme.com>",
    to: ["alice@example.com"],
    subject: "Your Invoice #1001",
    html: "<p>Invoice total: $49.00</p>",
  },
  {
    from: "Acme <receipts@acme.com>",
    to: ["bob@example.com"],
    subject: "Your Invoice #1002",
    html: "<p>Invoice total: $99.00</p>",
  },
  {
    from: "Acme <receipts@acme.com>",
    to: ["charlie@example.com"],
    subject: "Your Invoice #1003",
    html: "<p>Invoice total: $149.00</p>",
  }
]);

console.log("Batched email IDs:", data.map(item => item.id));
```

***

## Limits

* **Maximum batch size**: 100 emails per request.
* **Payload limit**: Maximum 10MB total payload size per batch request (including attachments).
* Each email in the batch receives its own distinct tracking ID and delivery log entry.


## Related topics

- [What sending feature to use?](/guides/sending/what-sending-feature-to-use.md)
- [Introduction](/sending/introduction.md)
- [Send Batch Emails](/api/emails/send-batch-emails.md)
- [Http](/getting-started/http.md)
