> ## 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

> Send an onboarding email with Resend using HTML, plain text, or a published template. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Send an onboarding email with Resend using HTML, plain text, or a published template.

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

## 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',
  {
    "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 --input '{
  "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": {
    "id": "id_123"
  }
}
```

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

## Input reference

Send an email

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.from` | `string` | Yes | — | Sender email address. To include a friendly name, use the format "Your Name ". |
| `payload.to` | `string \| array` | Yes | — | Recipient email address. For multiple addresses, send as an array of strings. Max 50. |
| `payload.subject` | `string` | Yes | — | Email subject. |
| `payload.bcc` | `string \| array` | No | — | Bcc recipient email address. For multiple addresses, send as an array of strings. |
| `payload.cc` | `string \| array` | No | — | Cc recipient email address. For multiple addresses, send as an array of strings. |
| `payload.reply_to` | `string \| array` | No | — | Reply-to email address. For multiple addresses, send as an array of strings. |
| `payload.html` | `string` | No | — | The HTML version of the message. |
| `payload.text` | `string` | No | — | The plain text version of the message. |
| `payload.template` | `object` | No | — | Use a published template to send the email. If provided, do not include html or text. |
| `payload.headers` | `object` | No | — | Custom headers to add to the email. |
| `payload.scheduled_at` | `string` | No | — | Schedule email to be sent later. The date should be in ISO 8601 format. |
| `payload.attachments` | `array` | No | — | — |
| `payload.tags` | `array` | No | — | — |
| `payload.topic_id` | `string` | No | — | 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. |
| `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": "Send an email",
    "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."
      },
      "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": [
      "from",
      "to",
      "subject"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.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": {
          "id": {
            "type": "string",
            "description": "The ID of the sent email."
          }
        },
        "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.