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

# Bulk Email Sending

> Learn how to send bulk emails using the Nuntly API. Send multiple emails in a single request with the bulk send method and fallback properties.

<Note>
  Before continuing, make sure you've completed the [SDK setup and requirements](/docs/guides/requirements).
</Note>

# Overview

Sending bulk emails is a powerful feature that allows you to reach a large audience efficiently. This guide will walk you through the process of sending bulk emails using the Nuntly API.

# Sending Bulk Emails

To send bulk emails, you can use the `bulk.send` method provided by the Nuntly SDK. This method allows you to send multiple emails in a single request.

```typescript theme={null}
const { data, error } = await nuntly.emails.bulk.send({
  emails: [
    {
      from: 'ray@info.tomlinson.ai',
      subject: 'Welcome to Tomlinson AI!',
      to: 'carlo43@gmail.com',
      text: 'Thank you for signing up! Please verify your email address.',
    },
    {
      from: 'ray@info.tomlinson.ai',
      subject: 'Welcome to Tomlinson AI!',
      to: 'pink42@yahoo.com',
      text: 'Thank you for signing up! Please verify your email address.',
    },
  ],
});

if (error) {
  return console.error('Error sending bulk emails:', error);
}
console.log(`Bulk emails sent successfully 🎉`, data);
```

In the example above, we are sending two emails in a single request. You can add as many email objects as needed to the `emails` array, up to the maximum limit (20) allowed by the Nuntly API.

Each email object can contain the same properties as a single email, such as `from`, `to`, `subject`, `html`, and `text`. This allows you to customize each email individually.

<Warning>
  Scheduling is not supported in bulk requests. For scheduled delivery, use [POST /emails](/docs/api-reference/emails/send-email) with a single email at a time.
</Warning>

## Sending Bulk Emails with fallback

You can specify fallback properties if you want to have default values for certain fields across all emails. For example:

```typescript theme={null}
const { data, error } = await nuntly.emails.bulk.send({
  fallback: {
    from: 'ray@info.tomlinson.ai',
    subject: 'Welcome to Tomlinson AI!',
  },
  emails: [{
    to: 'carlo43@gmail.com',
      text: 'Thank you for signing up! Please verify your email address Carlo.',

    }, {
      to: 'pink42@yahoo.com'
      text: 'Thank you for signing up! Please verify your email address Pinky.',}],
});
```

In this example, the `from` and `subject` fields are set in the `fallback` object, so they will be used for all emails unless overridden in the individual email objects.

If there is an error with one of the emails in the bulk request, the entire request will fail, and no emails will be sent. Make sure to handle errors appropriately in your application.

If the request is successful, the `data` object will contain information about the sent emails, including their unique bulk id and the status of each email.
