Latest API and SDK updates. Subscribe via RSS · Discord
Summary
Webhooks & Events – receive email and domain events via HTTP callbacks. Subscribe to message lifecycle events (received, sent, delivered, bounced, complained, rejected) and domain verification. Use Svix headers for verification and filter by inbox or pod. Perfect for agents that need reliable, async notifications without keeping a WebSocket open.
What’s new?
Webhook events:
message.received- New inbound emailmessage.sent- Outbound message sentmessage.delivered- Delivery confirmedmessage.bounced- Bounce (with type and recipients)message.complained- Spam complaintmessage.rejected- Rejection (e.g. validation)domain.verified- Domain verification succeeded
Delivery & verification:
- Svix-style headers:
svix-id,svix-signature,svix-timestampfor verification - Filter by inbox or pod (up to 10 per webhook)
- Payloads include inbox_id, thread_id, message_id, timestamps, and event-specific data
Use cases
Build agents that:
- React to new emails, bounces, and complaints via HTTP
- Sync email state to your database or queue
- Trigger workflows on domain verification
- Verify webhook signatures for security
Set up and verify webhooks in our Webhooks documentation.
Summary
Introducing Custom Domains – add and verify your own domains for sending and receiving email. Use DNS verification (TXT, CNAME, MX), export zone files for easy DNS setup, and control feedback (bounce and complaint) delivery. Perfect for agents that need to send from your brand’s domain with full control over deliverability.
What’s new?
New endpoints:
GET /domains- List all domainsGET /domains/{domain_id}- Get domain details and verification recordsPOST /domains- Create (add) a domainDELETE /domains/{domain_id}- Remove a domainGET /domains/{domain_id}/zone-file- Download zone file for DNS setupPOST /domains/{domain_id}/verify- Trigger domain verification
Domain features:
- DNS verification with TXT, CNAME, and MX records
- Verification status: NOT_STARTED, PENDING, VERIFYING, VERIFIED, FAILED, INVALID
- Per-record status (MISSING, INVALID, VALID) for targeted fixes
- Zone file export for quick import at your DNS provider
- Optional feedback (bounce/complaint) delivery per domain
Use cases
Build systems where:
- Agents send from your verified custom domain
- You manage DNS in one place and sync via zone file
- Verification status drives onboarding or monitoring
- Bounce and complaint handling is configured per domain
Learn more in our Custom Domains and Managing Domains guides.
Summary
Introducing the Drafts API – compose and manage email drafts before sending. Create drafts, update them over time, schedule send times, and send when ready. Perfect for agents that need to build messages incrementally, support reply threading, or queue emails for later delivery.
What’s new?
New endpoints:
GET /drafts- List all drafts (with optional filters)GET /drafts/{draft_id}- Get a draftPOST /inboxes/{inbox_id}/drafts- Create a draft in an inboxPATCH /inboxes/{inbox_id}/drafts/{draft_id}- Update a draftPOST /inboxes/{inbox_id}/drafts/{draft_id}/send- Send a draftDELETE /inboxes/{inbox_id}/drafts/{draft_id}- Delete a draft
Draft features:
- Compose with to, cc, bcc, subject, plain text, and HTML body
- Reply threading via
in_reply_toandreferences - Schedule send with
send_atfor delayed delivery - Attachments and labels
- List and filter drafts by inbox, labels, or time range
Use cases
Build agents that:
- Compose multi-step replies before sending
- Schedule follow-up emails for optimal delivery
- Queue outbound messages and send in batches
- Edit drafts based on new context or user feedback
- Maintain proper email threads with
in_reply_to
Learn more about composing and sending in our Drafts documentation.
Summary
We’re excited to introduce Metrics Endpoints - two new powerful endpoints that give you deep insights into your email deliverability and agent performance. Track critical events like bounces, deliveries, rejections, and complaints with detailed timestamps to build smarter, self-optimizing email agents.
What’s new?
New endpoints:
GET /metrics- Get comprehensive metrics across all your inboxesGET /inboxes/{inbox_id}/metrics- Get metrics for a specific inbox
Metrics tracked:
- Delivery events: sent, delivered, bounced, rejected
- Error tracking: complaints, spam reports
- Time-series data with detailed timestamps
Use cases
Build agents that:
- Monitor their own bounce rates in real-time
- Optimize send timing based on historical performance
- Automatically adjust behavior based on deliverability metrics
- Pause campaigns when performance drops below thresholds
- Implement intelligent retry strategies for better inbox placement
Ready to build smarter agents? Check out our Metrics API documentation to get started.
Summary
Introducing WebSocket Streaming - receive email events in real-time as they happen. Build reactive agents that respond instantly to new messages, deliveries, and bounces without polling. Perfect for building interactive, event-driven email experiences.
What’s new?
WebSocket endpoint:
wss://ws.agentmail.to/v0- Real-time event streaming
Events streamed:
message.received- New inbound email detectedmessage.sent- Outbound email sent successfullymessage.delivered- Delivery confirmed by recipient servermessage.bounced- Bounce detected (permanent or temporary)message.complained- Spam complaint received
Connection features:
- JWT-based authentication for secure connections
- Automatic reconnection with exponential backoff
- Event filtering by inbox for targeted subscriptions
- Low-latency delivery (typically under 100ms)
- Support for thousands of concurrent connections
Use cases
Build agents that:
- Respond to emails within seconds of receipt
- Monitor deliverability in real-time across all inboxes
- Trigger workflows instantly on specific events
- Build interactive conversational email experiences
- Scale to handle high-volume email operations
- React to bounces and complaints immediately
Get started with WebSocket Streaming to build real-time email agents.
Summary
Introducing Pods - team collaboration spaces for AgentMail. Share inboxes, domains, and resources across your organization while maintaining granular control. Perfect for teams building multi-agent email systems that need organized resource management.
What’s new?
New endpoints:
POST /pods- Create a new pod (team workspace)GET /pods- List all pods in your organizationGET /pods/{pod_id}- Get pod detailsDELETE /pods/{pod_id}- Delete a podPOST /pods/{pod_id}/inboxes- Create inbox within a podPOST /pods/{pod_id}/domains- Add custom domain to a podGET /pods/{pod_id}/threads- List threads within a podGET /pods/{pod_id}/metrics- Get metrics for a pod
Pod features:
- Shared inbox access across team members
- Per-pod domain configuration
- Isolated metrics and analytics per pod
- Organized resource hierarchy
Use cases
Build systems where:
- Multiple agents share email infrastructure
- Different teams manage their own inboxes independently
- Resources are organized by department or project
- Analytics are tracked per team workspace
- Billing and usage can be attributed to specific teams
Learn more about organizing teams with Pods in our documentation.
