Let AI agents draft email campaigns via /api/v1/campaigns and aveiro_newsletter_* MCP tools. Requires newsletter:read / newsletter:write — send and schedule stay in the dashboard.
Grant newsletter:read and newsletter:write on an API token or MCP OAuth connection. Agents list campaigns, draft and revise copy, and read analytics. Send, schedule, and test sends remain dashboard-only — there is no scope that grants them.
What agents can and cannot do
Action
Agent (API / MCP)
Human (dashboard)
List campaigns
Yes
Yes
Read campaign content and analytics
Yes — newsletter:read
Yes
Create and revise drafts
Yes — draft only
Yes
Send, schedule, or test send
No — not exposed
Yes
Send autonomously
No — structural guardrail
No without human action
Email goes to real inboxes — Aveiro keeps send and schedule in session-authenticated dashboard actions only.
Token setup
Complete Audience setup — verified sender domain or email provider (see Sending domains)
Open Organization → API tokens → Create token
Add newsletter:read to list campaigns and read analytics (requires Audience manage)
Add newsletter:write to draft and revise campaigns (requires Campaign create)
Copy the av_live_… secret — shown once
For MCP in Cursor or Claude, connect via the hosted MCP server at https://www.aveiro.app/api/mcp/mcp. OAuth grants include newsletter:read and newsletter:write when newsletter tools are authorized.Default content tokens (sites:read, content:read, content:write) do not include newsletter access — add newsletter scopes explicitly.See API tokens for the full scope list.
REST API
All routes live under /api/v1/campaigns on your platform host. Full reference: Newsletter API overview.
Method
Route
Purpose
GET
/api/v1/campaigns
List campaigns — optional status filter
POST
/api/v1/campaigns
Create a draft campaign
GET
/api/v1/campaigns/{campaignId}
One campaign with full HTML content
PATCH
/api/v1/campaigns/{campaignId}
Revise a draft campaign
GET
/api/v1/campaigns/{campaignId}/analytics
Sends, opens, clicks, top links, unsubscribes
Send Authorization: Bearer av_live_… on every request.
Typical agent loop
GET /api/v1/campaigns?status=sent — review a past send before drafting a follow-up
GET /api/v1/campaigns/{id}/analytics — note open rate and top clicked links
POST /api/v1/campaigns with subject, fromName, fromEmail, and htmlContent
Human opens Audience → Campaigns — reviews the draft in the campaign editor
Human chooses audience, sends or schedules from the dashboard
After send, agent can GET …/analytics again for reporting scripts
Agents may only PATCH campaigns in draft status. Sending, sent, and failed campaigns are immutable over the API — duplicate in the dashboard or create a new draft via POST.