Multiple Recipients Per Request
Pass an array of up to 50 email addresses in theto field. Lettr delivers a separate copy of the email to each recipient:
Personalization with Substitution Data
Usesubstitution_data to provide merge tag values that apply to all recipients in a batch. This is useful for shared variables like campaign names or dates:
Batch Limits
Sending to Large Lists
For recipient lists larger than 50, chunk the list into batches and send each batch with a separate API call. Adding a short delay between batches helps you stay within rate limits:Parallel Batch Sending
For faster throughput, send multiple batches concurrently usingPromise.all. This reduces total send time proportionally to the number of parallel batches, but be mindful of your rate limits:
Response for Batch Sends
The response indicates how many recipients were accepted or rejected:Rejected recipients may be on your suppression list or have invalid email addresses. Check your suppression list and validate addresses before sending.
Best Practices
Validate Addresses First
Validate Addresses First
Run email addresses through basic format validation and check them against your local suppression list before including them in a batch. Each rejected address in a batch send still counts against your rate limit, and high rejection rates can signal list quality issues to Lettr.
Use Personalization
Use Personalization
Personalized emails (using the recipient’s name, relevant data, or tailored content) achieve significantly higher open and click rates than generic messages. Use
substitution_data to customize merge tags without making separate API calls.Respect Rate Limits
Respect Rate Limits
Add a delay between batches to stay under the API rate limit of 3 requests per second per team, shared by all your live API keys. For example, sending at most 3 batch requests per second (one request roughly every 350 ms) with 50 recipients each reaches about 150 recipients per second without hitting the limit. A burst above that returns
429, so retry with backoff. A separate per-IP limit of 2,000 requests per 5 minutes applies on API routes. See Rate Limits for details.Handle Partial Failures
Handle Partial Failures
A batch send can partially succeed — some recipients are accepted while others are rejected (due to suppression or validation). Always check the
accepted and rejected counts in the response and log rejected addresses for investigation rather than silently dropping them.Use Webhooks for Delivery Status
Use Webhooks for Delivery Status
With batch sends, polling the API for each email’s delivery status is impractical. Set up webhooks to receive
message.delivery, message.bounce, and engagement.open events, which let you track outcomes for every recipient asynchronously.Tracking Batch Emails
Attach metadata to batch sends so you can query all emails from a specific batch later. Include a uniquebatch_id along with any campaign or timing information relevant to your use case:
request_id returned from each batch send to look up emails via the Email History API. Metadata is also included in webhook payloads, allowing you to correlate delivery events with your batch data.