Home
Email Deliverability

Bulk Email API Requests: How to Send in Batches Safely

Engineer preparing a controlled email batch

A bulk email API request is one call, or a controlled stream of calls, that delivers the same kind of message to many recipients. The hard part is not the request. It is everything around it: provider caps, retries that must not double-send, bounces that must stop the next batch, and replies that need somewhere to land. Qubrics supports batch sending through your own providers or managed Amazon SES, and provides mailboxes for replies.

Engineer preparing a controlled email batch

TL;DR

  • Send in batches sized to the lowest cap in your path: the provider's per-message recipient limit, the account's daily limit and your own queue's concurrency.
  • Make every batch idempotent: tag each message with your own ID so a retry after a timeout never sends twice.
  • Feed bounces and suppressions back before the next batch, not after the whole campaign.
  • Spread volume across providers with per-provider quotas and failover, instead of pushing one Gmail or SES account to its ceiling.
  • Use one platform for sending and receiving, so replies to your bulk run reach the agent that sent it, in the right thread.

Table of Contents

What "bulk" means for an API

There are two quite different jobs hiding under this keyword. The first is a marketing blast: one template, a big list, a send window. The second is the pattern we see far more in agent products: thousands of individual, personalised messages, each triggered by an agent or a workflow, sent from many mailboxes and replied to by real people.

Both hit the same three limits.

  1. Per-request limits. Providers cap how many recipients one API call can carry. Amazon SES, for example, limits a message to 50 recipients (To, CC and BCC combined), and that quota cannot be raised. A "bulk" call to SES is therefore many calls, not one giant one.
  1. Per-account limits. Consumer and workspace mailboxes carry daily caps, and exceeding them gets sending paused. Our guide to Gmail sending limits explains how those daily caps work and why a connected Gmail account is a poor place to push volume.
  1. Rate limits. Even within a daily cap, providers throttle requests per second. Ignoring that gives you 429 responses and half-finished batches.

So a reliable bulk send is a pipeline: split, queue, send with limits, record, retry, and react to what comes back.

Designing the batch: size, concurrency and idempotency

Size batches to the strictest cap

Work backwards from the smallest limit in your chain. If one provider accepts 50 recipients per message and your agent personalises each email, you are sending one recipient per message anyway, and the real constraint is requests per second and messages per day per sender. Calculate it per sender, not per campaign:

  • Daily cap of the sending account or provider.
  • Hourly pace you want, so volume ramps rather than spikes.
  • Number of sender mailboxes or domains you can spread across.

Worked example: 30,000 personalised emails, spread over three providers with a conservative 4,000 messages a day each, takes about three days at 12,000 a day. If you tried to send all 30,000 from one account in an afternoon, you would hit the cap on the first day and risk a suspension for the rest.

Use a queue, not a loop

A for loop that calls the send endpoint is the version that works in a demo and fails at 3am. Put each message on a queue with a status (pending, sent, deferred, failed), and let a worker pull at a controlled rate. That gives you pause, resume and per-tenant fairness for free. Our piece on email rate limiting, queueing and safe retries walks through the retry logic in detail.

Use a queue, not a loop

Make retries idempotent

Timeouts are the classic double-send. Your request reached the provider, the response did not reach you, and the retry sends the email again. Protect against it:

  1. Generate your own message ID before the first attempt and store it with the job.
  1. Before retrying a timed-out send, check the delivery log for that ID.
  1. Retry only on transient errors (timeouts, 429, 5xx) with exponential backoff and jitter. Never retry a hard rejection.

A delivery log you can query by your own identifier is what makes step 2 possible, which is why logs matter as much as the send call itself.

Where a single provider breaks down

Teams usually start with one sending provider, and it works until volume, reputation or a policy change bites. Typical failure points:

  • A connected Gmail or Outlook account hits a daily cap or is rate limited mid-batch.
  • An OAuth token expires in production and the whole batch stalls.
  • One sender domain picks up complaints and drags down the rest of the run.
  • A provider has an outage during a time-sensitive send.

The answer is not a bigger account. It is distribution. Qubrics can route outbound mail through connected Gmail OAuth, Outlook and custom SMTP accounts. It also offers managed Amazon SES. With delivery groups, you can configure provider weights and quotas. If no provider in a requested group is eligible, the send fails rather than routing outside the requested groups. You might aim for provider A to handle 50% of volume, provider B 30% and provider C 20%, each with its own daily ceiling.

ConcernSingle provider loopMulti-provider routing
Daily cap reachedBatch stopsOverflow goes to other providers within their quotas
Provider outageMessages fail or stallFailover to the next provider
Reputation hit on one domainWhole run affectedWeight shifted away from the affected sender
Per-sender quota trackingHand-builtPer-mailbox and per-provider quotas

If you want the longer comparison of what to look for in an email API for this kind of workload, see our guide to the best email API for developers.

Stop the batch when the signals turn bad

Volume without feedback is how senders burn domains. Build three checks into the pipeline, not into a monthly review.

Bounces. A hard bounce means the address does not exist. Add it to a suppression list immediately so the next batch skips it. Soft bounces (full mailbox, temporary failure) get a limited number of retries and then suppression. Qubrics provides delivery logs and supports webhook subscriptions. The mechanics are covered in our bounce handling guide for email APIs and webhooks.

Complaints. Treat any spike in complaints as a stop signal for that sender and domain, not a statistic to review later.

Authentication. Every sender domain needs SPF, DKIM and DMARC records in place before it carries volume. If you send across many domains, this is repetitive work that is easy to get wrong in one place.

A sensible gating rule for an agent: after each batch of a few hundred messages, check the hard bounce rate and complaint count for that sender. If either crosses your threshold, pause that sender and let the router shift its weight elsewhere.

Email sending signals and their safety actions

List quality matters as much as plumbing. If you are building the list itself, this guide to growing an email list covers strategies that keep engagement, and so delivery performance, healthy at scale.

Bulk sending for AI workflows: the reply problem

Batch email in an agent product is rarely one-way. An outbound sequence draws replies, out-of-office notices, unsubscribe requests and the odd angry response. If your sending API cannot receive, you bolt on a parser, a webhook relay and probably a Gmail connection, each with its own failure modes.

You can create a Qubrics mailbox for an agent, customer, workspace or tenant, with a real address on the shared @myagent.mx domain or a verified sending and receiving domain. Replies stay in the mailbox, where the Mailbox API lets you read them by conversation thread.

For the agent reading those replies, the Mailbox API returns cleaned message text and can include HTML on request. It strips quoted history by default, so the agent acts on the new reply without parsing a raw MIME thread. That matters for cost: structured parsing means fewer tokens spent feeding an LLM a thread of repeated quotes.

When the same agent needs to work through hundreds of replies, the mailbox side supports batch operations too:

  • Filtered listing. Query messages by folder, thread, sender, subject, headers, date range, keywords, unread and has-attachment. The thread filter must be used on its own.
  • Counts without rows. A count endpoint answers "how many unread replies?" without pulling any message bodies.
  • Snippets. Search-snippets returns previews so the agent can triage before fetching full bodies.
  • Batch get, update and delete. Read messages, update allowed flags, or move or delete messages in batches. For example, mark a processed set as handled.
  • Sync tokens. Sync endpoints return state tokens so the agent polls for what changed instead of re-listing the inbox.

That last point replaces the IMAP polling loop many self-hosted agents still run.

A step-by-step routine for a bulk run

  1. Prepare the senders. Verify each sending domain (SPF, DKIM, DMARC) and connect the providers or mailboxes that will carry the volume. Set per-provider and per-mailbox quotas below the real provider limits, leaving headroom.
  1. Clean the list. Remove known bounces and previous unsubscribes using your suppression data. Sending to a stale list is the fastest way to a bounce spike.
  1. Split and queue. Break the job into individual message records with your own IDs, personalised content and a scheduled send time spread across the window you want.
  1. Send at a paced rate. Release messages from the queue within each sender's quota. Let the router pick the provider by weight and fail over on error.
  1. Listen for events. Consume delivery, bounce and reply events by webhook. Update your queue status from them, not from the send response alone.
  1. Suppress and adapt. Add hard bounces and complaints to suppression at once. Pause any sender whose numbers cross your threshold.
  1. Handle replies. Route inbound mail to the right agent or queue by mailbox, thread or header, and let the agent act on the cleaned reply text.
  1. Review the run. Read the delivery logs by sender, provider and domain. Adjust weights and quotas before the next run.

What it costs to send in volume

Bulk sending is a volume business, so the pricing model matters more than the headline plan. Qubrics tracks costs for incoming email, outgoing email and storage. See the pricing page for plan and usage rates.

Check the pricing page for the current rates before you budget, since usage prices can change.

Common mistakes with bulk email API requests

  • Treating a 200 response as delivery. Acceptance by the provider is not inbox placement. Track events.
  • Retrying without an ID. This is how a timeout becomes a duplicate email to 5,000 people.
  • One sender for everything. Concentrating volume on one domain concentrates the risk.
  • Ignoring inbound. Replies and bounces that arrive nowhere mean your agent keeps emailing people who asked it to stop.
  • Skipping warm-up. New domains and mailboxes need volume ramped up gradually, not on day one.

Perspective

The pattern we keep coming back to is that bulk sending stops being a sending problem the moment an agent is involved. The send call is the easy ten per cent. The rest is quotas, retries, suppression, threading and replies, and teams usually end up gluing together a sending provider, a Gmail OAuth connection, a parser and a webhook relay to cover it.

With Qubrics, you can set up persistent mailboxes with real addresses for agents or tenants, route outbound mail through providers you already own, configure their weights and quotas, and check the delivery logs. Qubrics records outgoing usage when it first records the provider’s acceptance.

If you are designing a bulk pipeline today, our advice is to decide your quotas and your failure behaviour first, then pick the infrastructure that lets you express them. That is the order we designed the platform in.

Start sending in batches with Qubrics

Start with a mailbox and run a small batch. Look at the email sending API for how routing works, or the pricing page to model your own volume.

Sources

Frequently Asked Questions

Is there a single API call that sends to thousands of recipients?

Not in a way that is safe in practice. Providers cap recipients per message (Amazon SES allows [50 per message](https://docs.aws.amazon.com/ses/latest/dg/quotas.html)), and personalised email is one message per recipient anyway. The reliable approach is a queue that releases individual sends at a controlled rate within each sender's quota.

What is the difference between a bulk email API and a batch email API?

In day-to-day use they mean the same thing: sending many messages programmatically instead of one at a time. "Batch" usually points to the mechanics of grouping requests, and "bulk" to the volume. What matters is the same either way: quotas, idempotent retries and feedback from bounces.

How do I stop a retry from sending a duplicate email?

Assign your own message ID before the first attempt and store it. When a request times out, check the delivery log for that ID before sending again, and retry only on transient errors with backoff. Never retry a hard rejection.

How should an AI agent handle replies to a bulk send?

Give the agent a persistent mailbox so replies are stored and threaded, then let it read cleaned reply text rather than raw MIME. Use counts and snippets to triage first, and batch update calls to mark processed messages. Qubrics's Mailbox API is built around that flow.

Can I spread a bulk send across Gmail, Outlook and Amazon SES?

Yes, if each provider is set up and eligible for the send. Qubrics supports connected Gmail OAuth, Outlook and custom SMTP accounts, as well as managed Amazon SES. Delivery groups let you set provider weights and quotas, but a send fails if no provider in the requested groups is eligible. The managed Amazon SES account does not support delivery groups.