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.

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.What "driving with an agent" means
An AI agent — a script, an assistant, a workflow — chains the steps with no human intervention in between:- Create and fill a list —
POST /api/v1/lists, then a bulk contact import, up to 500 per call. - Write a template —
POST /api/v1/templates, with the email's HTML. - Create a campaign from that template, then edit its content independently —
PATCH /api/v1/campaigns/{id}. - Trigger the send —
POST /api/v1/campaigns/{id}/send. - Read the results —
GET /api/v1/campaigns/{id}returns progress, sends, bounces.
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"