API Reference
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):HTTP Status Codes
| Code | Description |
|---|---|
200 | Success - Email queued for delivery |
400 | Bad Request - Domain configuration error |
401 | Unauthorized - Invalid or missing API key |
422 | Unprocessable Entity - Validation failed |
502 | Bad Gateway - Upstream transmission failed |
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
validation_error | 422 | Request validation failed. Check the errors object for field-specific messages. |
invalid_domain | 400 | The sender domain could not be determined from the email address. |
unconfigured_domain | 400 | The sender domain is not configured or approved for sending. |
send_error | 400 | General error during email send preparation. |
transmission_failed | 502 | Email transmission to the upstream provider failed. |
API Endpoints
Send Email
Send emails to one or more recipients