AgentsMailv2
ProductAPIDeliverabilityPricingChangelog
docsSign inGet an API key
AgentsMailPrivacyLegal
AgentsMail
ProductDocsBlogPricing
Get started

Newsletter

Stay updated with our latest articles and web development news.

No spam, unsubscribe anytime

Blog/Email marketing for AI agents/Driving email campaigns with AI agents

Driving email campaigns with AI agents

When every action is an API call, an AI agent can do all the work: write, target, send, measure, repeat. Here’s what that looks like in practice.

MC
Mike Codeur

Aug 9, 2026 · 3 min

Driving email campaigns with AI agents

Driving campaigns with AI agents

Most marketing tools have an API at the edge: a way to export contacts, wire up a webhook. The real work still happens with a mouse. AgentsMail flips that. The API is the product, the web interface is just one client. Any action you can do on screen is an HTTP call — which makes it doable by an agent.
Votre navigateur ne prend pas en charge la lecture de vidéos.

What "driving with an agent" means

An AI agent — a script, an assistant, a workflow — chains the steps with no human intervention in between:
  1. Create and fill a list — POST /api/v1/lists, then a bulk contact import, up to 500 per call.
  2. Write a template — POST /api/v1/templates, with the email's HTML.
  3. Create a campaign from that template, then edit its content independently — PATCH /api/v1/campaigns/{id}.
  4. Trigger the send — POST /api/v1/campaigns/{id}/send.
  5. Read the results — GET /api/v1/campaigns/{id} returns progress, sends, bounces.
At no point is there a copy-paste between a spreadsheet and an interface. The agent reads one campaign's results and writes the next one accordingly.

A concrete example

bash
# 1. Create the list
curl -X POST https://emails.example.com/api/v1/lists \
  -H "x-api-key: $MK_API_KEY" \
  -d '{"name":"Active customers"}'

# 2. Import contacts in bulk
curl -X POST https://emails.example.com/api/v1/lists/$LIST_ID/contacts/bulk \
  -H "x-api-key: $MK_API_KEY" \
  -d '{"contacts":[{"email":"ada@example.com","firstName":"Ada"}]}'

# 3. Launch the campaign
curl -X POST https://emails.example.com/api/v1/campaigns/$CAMPAIGN_ID/send \
  -H "x-api-key: $MK_API_KEY"
Three calls. The same sequence can be scripted, scheduled, or handed to an agent that decides the segment and timing on its own.

Why it's useful, not just clever

Repetition disappears. A weekly campaign to a segment that changes each week no longer needs manual handling: the agent recomputes the target, adapts the message, sends, and hands you a report. The guardrails stay. Driving by API doesn't mean opening everything. Sending stays protected — an organization must be explicitly allowed to send, and triggering requires a specific role. A misconfigured agent can't burn your sender reputation. Tracking is legible. At any moment, the agent — or you — can query a campaign's state: how many sends went out, how many are in flight, how long since the last activity. Enough to tell a slow send from a stuck one.

The right level of autonomy

Driving with an agent doesn't mean automating everything blindly. The model that works lets the agent prepare — write, target, schedule — and keeps a human check before the sends that matter. That's exactly what an API where every step is a separate call enables: you choose what the agent does alone, and what goes through you.
ai-agentapiautomationemailing
MC

Written by

Mike Codeur

Read next

All articles
Comparisons8 min

Mailchimp vs Brevo vs AgentsMail: Which One to Choose?

Mailchimp vs Brevo vs AgentsMail, by profile: prices checked on each official site, free plans, automation and AI agent support, so you pick the right tool.

Nov 16, 2026
AI agents9 min

How to Send an Email Campaign from Claude (Step by Step)

Run a Claude email campaign end to end: connect Claude to AgentsMail, draft and render the template, test, approve the send, read the stats. Prompts included.

Nov 9, 2026
Use cases10 min

Email Marketing for SaaS: Onboarding to Win-Back

Email marketing for SaaS, stage by stage: onboarding emails, trial conversion, product updates and win-back, run by your AI agent and triggered by your app.

Nov 2, 2026