lumail.emails.send
SDK 2.1.0 · API v2 · POST /api/v2/emails
MethodPOST
/api/v2/emails[email protected] · lumail.emails
emails.send(params: SendEmailParams, options?: { idempotencyKey?: string }): Promise<LumailResult<{ id: string }>>Queues one transactional email. Exactly one of html, tiptap, or markdown. Unsupported: attachments, template, topic_id, scheduled_at, react, content, contentType.
Body Parameters
| Name | Type | Description |
|---|---|---|
from | string | Required. Sender. Display name is allowed: Acme <[email protected]>. Domain must be verified. |
to | string or [string] | Required. One recipient. A one-address array is accepted. |
subject | string | Required. Subject line. |
html | string | HTML body. Provide exactly one of html, tiptap, or markdown. |
tiptap | string or object | TipTap JSON. Rendered to HTML on send. |
markdown | string | Markdown body. Rendered to HTML on send. |
text | string | Plain-text body. Omit to generate from HTML. Empty string skips generation. |
reply_to | string or string[] | Reply-To addresses. Stored as an array. SES uses the first address. |
cc | string or string[] | Carbon copies. |
bcc | string or string[] | Blind carbon copies. |
headers | object | Extra MIME headers. |
tags | { name, value }[] | Metadata tags stored on the email. |
preview | string | Preview / preheader text. |
Options
| Name | Type | Description |
|---|---|---|
idempotencyKey | string | Second-argument option. Mapped to the Idempotency-Key header. Repeat the same key to reuse the queued email id. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Queued email id (eml_...). Fetch the body and last_event with emails.get. |
data is { id }. Failures return { data: null, error: { name, message, statusCode } }.