The email infrastructure
for autonomous subscription management.
Developers building subscription agents need primitives to send renewal notices, process cancellation requests, and access service dashboards securely. Mailgent provides the email API and encrypted vault so your agent can manage the full subscription lifecycle end-to-end.
API Primitives used
mail.sendSend renewal notices
Deliver renewal reminders, plan change confirmations, billing updates, and payment receipts to subscribers from a dedicated identity.
mail.list_messagesDetect requests
Monitor for cancellation requests, upgrade inquiries, billing questions, and payment failure notifications from subscribers.
mail.replyHandle requests
Reply to subscribers in-thread with confirmation, personalized retention offers, or detailed plan change information.
vault.getAccess service credentials
Retrieve stored credentials to log into SaaS vendor dashboards for processing subscription changes and account updates.
Subscription management is death by a thousand emails.
Every SaaS business handles a constant stream of subscription emails — renewal reminders, cancellation requests, plan change inquiries, and billing disputes. Each one requires reading the email, looking up the account, taking the appropriate action, and replying with confirmation. At scale, this becomes a full-time job that nobody wants.
Developers building subscription agents need email primitives to handle these workflows and vault access for service dashboards. Mailgent provides mail.send for proactive notices, mail.list_messages to detect requests, mail.reply for responses, and vault.get for secure service access.
How to build it.
mail.sendSend renewal notices
Your agent sends renewal reminders using mail.send — 30 days, 7 days, and 1 day before expiry. Each email includes the plan, amount, and renewal date.
mail.list_messagesProcess incoming requests
The agent monitors for subscriber emails with mail.list_messages — cancellation requests, plan changes, and billing questions. It reads each one and determines the appropriate action.
mail.replyTake action and respond
The agent processes the request, replies with confirmation using mail.reply, and labels the thread. For cancellations, it may offer a retention discount before processing.
Example prompt
“Check for cancellation requests from this week. Reply to each with a 20% retention offer valid for 48 hours. If they already declined a previous offer, process the cancellation and confirm via email.”
What developers build.
Renewal reminders
Build agents that send multi-stage renewal reminders at 30, 7, and 1 day before expiry, and automatically process renewals when no cancellation is received.
Cancellation retention
Build agents that reply to cancellation emails with personalized retention offers based on the subscriber's usage history, plan tier, and tenure.
Plan change processing
Build agents that read upgrade or downgrade requests via email, confirm the new pricing and features, and process the plan change automatically.
SaaS spend management
Build agents that log into vendor dashboards with vault.get, review subscription costs, and send monthly spend summaries to finance.
Why not handle this in your billing platform?
Billing platforms handle charges and invoices, but subscriber communication is an afterthought. Their emails are template-based and cannot handle the nuance of retention conversations, custom plan negotiations, or multi-threaded billing disputes.
Mailgent gives you email primitives for the communication layer. mail.list_messages reads subscriber requests, mail.reply handles the conversation, and vault.get lets your agent access service dashboards. Your agent manages the relationship, not just the transaction.
Encrypted service credentials
Dashboard passwords stored in AES-256-GCM vault. Your agent logs in securely without exposing credentials.
Subscriber data isolation
The subscription agent operates in its own identity. It cannot access internal communications or unrelated data.
Action audit trail
Every cancellation, renewal, and plan change processed by the agent is logged for billing reconciliation.