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

NameTypeDescription
fromstringRequired. Sender. Display name is allowed: Acme <[email protected]>. Domain must be verified.
tostring or [string]Required. One recipient. A one-address array is accepted.
subjectstringRequired. Subject line.
htmlstringHTML body. Provide exactly one of html, tiptap, or markdown.
tiptapstring or objectTipTap JSON. Rendered to HTML on send.
markdownstringMarkdown body. Rendered to HTML on send.
textstringPlain-text body. Omit to generate from HTML. Empty string skips generation.
reply_tostring or string[]Reply-To addresses. Stored as an array. SES uses the first address.
ccstring or string[]Carbon copies.
bccstring or string[]Blind carbon copies.
headersobjectExtra MIME headers.
tags{ name, value }[]Metadata tags stored on the email.
previewstringPreview / preheader text.

Options

NameTypeDescription
idempotencyKeystringSecond-argument option. Mapped to the Idempotency-Key header. Repeat the same key to reuse the queued email id.

Response Fields

FieldTypeDescription
idstringQueued email id (eml_...). Fetch the body and last_event with emails.get.

data is { id }. Failures return { data: null, error: { name, message, statusCode } }.