Skip to main content
The client.emails resource sends transactional email. Every call returns a Result — destructure { data, error } and handle error before using data.

Send an Email

A send requires from, to, subject, and at least one of html, text, or template_slug. The full recipient cap is 50 addresses across to/cc/bcc.

API Reference

POST /emails

Plain Text & Multipart

Send with a Template

When sending a template, subject is optional — the template’s own subject is used unless you override it. The substitution_data keys map to merge tags (e.g. {{name}}):
See Templates for managing templates programmatically.

Tracking, Tags & Metadata

Attachments

Scheduling

Pass an ISO-8601 scheduled_at to schedule a send, then manage it by transmission id:

API Reference

POST /emails/schedule

Error Handling

The SDK never throws for API or network errors — it returns them in error. Discriminate on error.type first, then optionally on error.error_code:
Always handle error before reading data. TypeScript narrows data to non-null only inside the if (!error) branch — reading data without the check leaves it typed as possibly null.

What’s Next

Templates

Manage Lettr templates

Webhooks

Receive delivery and engagement events