Skip to main content
The Lettr API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

Authentication

Authenticate requests using an API key in the Authorization header:

Request Format

Send JSON-encoded bodies with the appropriate Content-Type header:

Response Format

Success response (200):
Error response (400, 502):
Validation error response (422):

HTTP Status Codes

Error Codes

Send Email Reference

Subject

The subject field is conditionally required:
  • Required when sending with html or text content directly.
  • Optional when template_slug is provided — if omitted, Lettr uses the template’s stored subject. If the template has no subject set, the template name is used instead.
  • If provided alongside a template_slug, the subject overrides the template’s subject. This is useful for A/B testing or dynamic subject lines.
Maximum length: 998 characters.

Options

The options object controls tracking and email classification:
Since transactional defaults to true, you only need to explicitly set it when sending marketing emails (transactional: false).

Custom Headers

The headers field lets you add custom email headers to your message. Pass an object where each key is the header name and each value is the header value. Limits:
  • Maximum 10 custom headers per email
  • Maximum 998 characters per header value
The following headers are blocked and cannot be set via the headers field — Lettr manages them automatically:From, To, Cc, Bcc, Reply-To, Subject, Date, Message-ID, MIME-Version, Content-Type, Content-Transfer-Encoding, DKIM-Signature, Return-Path, Received, List-Unsubscribe, List-Unsubscribe-Post

API Endpoints

Send Email

Send emails to one or more recipients

Templates

Manage templates, merge tags, and rendered HTML

Domains

Create, verify, and manage sending domains

Webhooks

View webhook configurations