# Email payload reference

Reference for the `EmailPayload` message used by [`Notify`](/developer/api-reference/messaging-api-v2/notify/) when sending email.

<Aside type="note">
For push / SMS / messenger payloads, see the [Payload reference](/developer/api-reference/messaging-api-v2/payload-reference/).
</Aside>

## EmailPayload

- `subject` (map&lt;string, string&gt;): subject line keyed by locale, e.g. `{"en": "Hello!", "es": "¡Hola!"}`.
- `body` (string): HTML body of the email. For per-locale HTML bodies, use `email_template` with an [Email Template](/product/content/email-content/) configured in the Control Panel.
- `attachments` (array of [`Attachment`](#attachment)): file attachments.
- `list_unsubscribe` (string): custom URL for the `List-Unsubscribe` header.
- `from` ([`Address`](#address)): override the default `From` configured in the app's email settings.
- `reply_to` ([`Address`](#address)): override the default `Reply-To` configured in the app's email settings.
- `email_template` (string): code of an [Email Template](/product/content/email-content/) to use instead of an inline `body`.

## Attachment

```json
{
  "name": "invoice.pdf",
  "content": "<base64-encoded bytes>"
}
```

| Field | Type | Description |
|---|---|---|
| `name` | string | File name as the recipient sees it. |
| `content` | string | Base64-encoded file content. |

## Address

```json
{
  "name":  "Pushwoosh",
  "email": "support@example.com"
}
```

Both fields are optional.
If `name` is omitted, the recipient sees the raw email address.

## Example: Send an email to a segment

```bash
curl -X POST https://api.pushwoosh.com/messaging/v2/notify \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "segment": {
      "application": "XXXXX-XXXXX",
      "platforms": ["EMAIL"],
      "code": "newsletter_subscribers",
      "email_payload": {
        "subject": { "en": "Our May updates", "es": "Novedades de mayo" },
        "email_template": "may-digest-2026",
        "from":     { "name": "Pushwoosh Team", "email": "news@example.com" },
        "reply_to": { "email": "replies@example.com" }
      },
      "schedule": { "at": "2026-05-01T09:00:00Z" },
      "message_type": "MESSAGE_TYPE_MARKETING"
    }
  }'
```

## Example: Transactional email with attachment

```bash
curl -X POST https://api.pushwoosh.com/messaging/v2/notify \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "transactional": {
      "application": "XXXXX-XXXXX",
      "platforms": ["EMAIL"],
      "users": { "list": ["customer-42"] },
      "email_payload": {
        "subject": { "en": "Your invoice" },
        "body":    "<p>Please find your invoice attached.</p>",
        "attachments": [
          { "name": "invoice.pdf", "content": "JVBERi0xLjQKJe..." }
        ]
      },
      "schedule": { "at": "2026-05-01T12:00:00Z" },
      "message_type": "MESSAGE_TYPE_TRANSACTIONAL"
    }
  }'
```