# Send email

`emails_send`

Sends one email to up to fifty addresses, from an address on a verified domain of the workspace. It takes cc, bcc, a reply address, headers, tags, attachments, a published template with its variables and a time to send at. With an idempotency key (the field, or the Idempotency-Key header) a repeat within a day answers with the first email. Sent with a test key, or to test addresses only, the email belongs to the sandbox: its `mode` is `test`, it reaches nobody and what happens to it is simulated.

Needs the scope: `emails:send`

## Arguments

- `from` (string): The sender, on a verified domain. An address, or a name and an address as `Acme <hello@mail.example.com>`. Needed unless a template gives one. Up to 500 characters.
- `to` (string | string[], required): Who the email is for: one address, or up to 50. A test address, such as `delivered@opensend.test` or `bounced@opensend.test`, reaches nobody and ends the way its name says.
- `cc` (string | string[]): Who gets a copy: one address, or up to 50.
- `bcc` (string | string[]): Who gets a copy without the others seeing: one address, or up to 50.
- `replyTo` (string): The address replies go to, when it is not the sender. Without it, the one of the template when it has one, then the default of the workspace.
- `subject` (string): The subject line. Needed unless a template gives one. Up to 500 characters.
- `html` (string): The message as HTML. Up to 200,000 characters.
- `text` (string): The message as plain text. Send it with `html`, or alone. With a template it replaces the plain text of the template. Up to 200,000 characters.
- `headers` (Record<string, string>): Extra headers for the message, by name. Up to 20, and not the ones the platform writes itself.
- `tags` (Record<string, string>): Labels of your own for the email, by name, such as `{ "campaign": "welcome" }`. Up to 10. They come back on the email and in webhooks.
- `template` (object): A published template to build the email from, in place of `subject`, `html` and `text`. Its sender and reply address are used when you give none.
- `template.id` (string, required): The id or the alias of a published template. Up to 500 characters.
- `template.variables` (Record<string, string | number>): A value for each `{{NAME}}` in the template, by name. A variable with a default in the template can be left out.
- `attachments` (object[]): Files to attach. Up to 10, and 10 MB together.
- `attachments[].filename` (string, required): The name of the file as the recipient sees it. Up to 255 characters.
- `attachments[].content` (string): The file, encoded as Base64. Give this or `path`, not both. Up to 14,000,000 characters.
- `attachments[].path` (string): An `https://` address to fetch the file from. Give this or `content`, not both. Up to 2,000 characters.
- `attachments[].contentType` (string): The media type of the file, such as `application/pdf`. Without it the type is taken from the name. Up to 120 characters.
- `scheduledAt` (string): When to send it, as an ISO 8601 time with an offset, such as `2026-12-01T09:00:00Z`. Up to 30 days ahead. Without it the email is sent now.
- `idempotencyKey` (string): A key of your own that makes a repeat of this request answer with the first result and send nothing. The `Idempotency-Key` header does the same.

## Returns

The answer comes back under `structuredContent`, with the same JSON as text in `content`. A call the API refuses comes back with `isError` set, and the code and the message under `structuredContent.error`. [MCP](https://opensend.sh/docs/mcp) shows how to connect a client.

- `object` ("email"): Always `email`.
- `id` (string): The id of the email.
- `from` (string): The sender.
- `to` (string[]): Who the email is for.
- `subject` (string): The subject line.
- `status` (string): Where the email is: `scheduled`, `queued`, `sent`, `delivered`, `delayed`, `bounced`, `complained`, `failed` or `canceled`, and `opened` or `clicked` once the recipient acts. One of: `queued`, `sent`, `delivered`, `delayed`, `bounced`, `opened`, `clicked`, `complained`, `failed`, `scheduled`, `canceled`.
- `mode` (string): `live` for a real email. `test` for an email of the sandbox: it was sent with a test key or to test addresses, nothing left the service and what happened to it is simulated. One of: `live`, `test`.
- `domain` (string): The domain it was sent from.
- `cc` (string[]): Who got a copy.
- `bcc` (string[]): Who got a copy without the others seeing.
- `replyTo` (string | null): The address replies go to, or `null`.
- `scheduledAt` (string | null): When it is due to be sent, or `null` for an email sent at once.
- `createdAt` (string): When the API accepted the email.
- `html` (string | null): The message as HTML, or `null`.
- `text` (string | null): The message as plain text, or `null`.
- `headers` (Record<string, string>): The extra headers you sent, by name.
- `tags` (Record<string, string>): The tags you sent, by name.
- `attachments` (object[]): The files that were attached. Their content is not kept.
- `attachments[].filename` (string): The name of the file.
- `attachments[].contentType` (string | null): The media type of the file, or `null` when none was given.
- `attachments[].size` (integer | null): The size of the file in bytes, or `null` when it was given by address.
- `templateId` (string | null): The id of the template it was built from, or `null`.
- `automation` (object | null): The automation run that sent it, or `null` for an email you sent yourself.
- `automation.id` (string): The id of the automation.
- `automation.runId` (string): The id of the run.
- `automation.stepId` (string): The id of the step that sent it.
- `events` (object[]): What has happened to the email, oldest first.
- `events[].type` (string): What happened: the status the email moved to. One of: `queued`, `sent`, `delivered`, `delayed`, `bounced`, `opened`, `clicked`, `complained`, `failed`, `scheduled`, `canceled`.
- `events[].at` (string): When it happened.
- `events[].detail` (string): More about it, such as the reason for a bounce. Often empty.

## Example

MCP:

```json
{
  "name": "emails_send",
  "arguments": {
    "from": "Acme <hello@mail.example.com>",
    "to": "ada@example.com",
    "subject": "Your receipt for November",
    "html": "<p>Thanks for your order.</p>"
  }
}
```

Answer, under structuredContent:

```json
{
  "object": "email",
  "id": "em_10",
  "from": "Acme <hello@mail.example.com>",
  "to": [
    "ada@example.com"
  ],
  "subject": "Your receipt for November",
  "status": "queued",
  "mode": "live",
  "domain": "mail.example.com",
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "scheduledAt": null,
  "createdAt": "2026-11-27T09:30:00.000Z",
  "html": "<p>Thanks for your order.</p>",
  "text": null,
  "headers": {},
  "tags": {},
  "attachments": [],
  "templateId": null,
  "automation": null,
  "events": [
    {
      "type": "queued",
      "at": "2026-11-27T09:30:00.000Z",
      "detail": "Accepted by the API and queued."
    }
  ]
}
```
