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

# Resend: Emails Send Batch

> Trigger up to 100 batch emails at once. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Trigger up to 100 batch emails at once.

> [!NOTE]
>
> Tool ID: `resend_emails_send_batch`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'resend_emails_send_batch',
  {
    "body": [
      {
        "from": "example",
        "to": "example",
        "subject": "Introduction"
      }
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run resend_emails_send_batch --input '{
  "body": [
    {
      "from": "example",
      "to": "example",
      "subject": "Introduction"
    }
  ]
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {
        "id": "id_123"
      }
    ]
  }
}
```

Use `deepline describe resend_emails_send_batch --json` for the latest machine-readable contract.

## Input reference

Trigger up to 100 batch emails at once.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.body` | `array` | Yes | — | — |
| `payload.idempotency_key` | `string` | No | — | Stable send identity for retries. Resend deduplicates for 24 hours. Plays derive a step key when omitted. Minimum length: 1. Maximum length: 256. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Trigger up to 100 batch emails at once.",
    "properties": {
      "body": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string",
              "description": "Sender email address. To include a friendly name, use the format \"Your Name \"."
            },
            "to": {
              "description": "Recipient email address. For multiple addresses, send as an array of strings. Max 50.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 50,
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "subject": {
              "type": "string",
              "description": "Email subject."
            },
            "bcc": {
              "description": "Bcc recipient email address. For multiple addresses, send as an array of strings.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "cc": {
              "description": "Cc recipient email address. For multiple addresses, send as an array of strings.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "reply_to": {
              "description": "Reply-to email address. For multiple addresses, send as an array of strings.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "html": {
              "type": "string",
              "description": "The HTML version of the message."
            },
            "text": {
              "type": "string",
              "description": "The plain text version of the message."
            },
            "template": {
              "type": "object",
              "description": "Use a published template to send the email. If provided, do not include html or text.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The id of the published email template."
                },
                "variables": {
                  "type": "object",
                  "description": "Template variables object with key/value pairs.",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            },
            "headers": {
              "type": "object",
              "description": "Custom headers to add to the email."
            },
            "scheduled_at": {
              "type": "string",
              "description": "Schedule email to be sent later. The date should be in ISO 8601 format."
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "Content of an attached file.",
                    "format": "binary"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Name of attached file."
                  },
                  "path": {
                    "type": "string",
                    "description": "Path where the attachment file is hosted"
                  },
                  "content_type": {
                    "type": "string",
                    "description": "Optional content type for the attachment, if not set it will be derived from the filename property"
                  },
                  "content_id": {
                    "type": "string",
                    "description": "Content ID for embedding inline images using cid references (e.g., cid:image001)."
                  }
                },
                "additionalProperties": false
              }
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters."
                  },
                  "value": {
                    "type": "string",
                    "description": "The value of the email tag.It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters."
                  }
                },
                "additionalProperties": false
              }
            },
            "topic_id": {
              "type": "string",
              "description": "The topic ID to scope the email to. If the recipient is a contact and opted-in to the topic, the email is sent. If opted-out, the email is not sent. If the recipient is not a contact, the email is sent if the topic's default subscription is opt_in."
            }
          },
          "required": [
            "from",
            "to",
            "subject"
          ],
          "additionalProperties": false
        }
      },
      "idempotency_key": {
        "type": "string",
        "description": "Stable send identity for retries. Resend deduplicates for 24 hours; Plays derive a step key when omitted.",
        "minLength": 1,
        "maxLength": 256
      }
    },
    "required": [
      "body"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `array` | No | — | — |
| `result.data.data[].id` | `string` | No | — | The ID of the sent email. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The ID of the sent email."
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.