Email payload reference
هذا المحتوى غير متوفر بلغتك بعد.
Reference for the EmailPayload message used by Notify when sending email.
EmailPayload
Anchor link tosubject(map<string, string>): subject line keyed by locale, e.g.{"en": "Hello!", "es": "¡Hola!"}.body(string): HTML body of the email. For per-locale HTML bodies, useemail_templatewith an Email Template configured in the Control Panel.attachments(array ofAttachment): file attachments.list_unsubscribe(string): custom URL for theList-Unsubscribeheader.from(Address): override the defaultFromconfigured in the app’s email settings.reply_to(Address): override the defaultReply-Toconfigured in the app’s email settings.email_template(string): code of an Email Template to use instead of an inlinebody.
Attachment
Anchor link to{ "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
Anchor link to{ "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
Anchor link tocurl -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
Anchor link tocurl -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" } }'