For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
contact@agentmail.ccDiscord
DocumentationAPI ReferenceKnowledge BaseChangelog
DocumentationAPI ReferenceKnowledge BaseChangelog
LogoLogo
contact@agentmail.ccDiscord

AgentMail Changelog

Latest API and SDK updates. Subscribe via RSS · Discord

October 25, 2025
October 25, 2025
Was this page helpful?
Edit this page
Previous

August 13, 2025

Next
Built with

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 draft
  • POST /inboxes/{inbox_id}/drafts - Create a draft in an inbox
  • PATCH /inboxes/{inbox_id}/drafts/{draft_id} - Update a draft
  • POST /inboxes/{inbox_id}/drafts/{draft_id}/send - Send a draft
  • DELETE /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_to and references
  • Schedule send with send_at for 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
1from agentmail import AgentMail
2
3client = AgentMail(api_key="your-api-key")
4
5# create a draft in an inbox
6draft = client.inboxes.drafts.create(
7 inbox_id="support@example.com",
8 to=["user@example.com"],
9 subject="Re: Your request",
10 text="We're looking into it.",
11 in_reply_to="<message-id@example.com>"
12)
13
14# update the draft
15client.inboxes.drafts.update(
16 inbox_id="support@example.com",
17 draft_id=draft.draft_id,
18 text="We've resolved your request."
19)
20
21# send the draft
22client.inboxes.drafts.send(
23 inbox_id="support@example.com",
24 draft_id=draft.draft_id
25)

Learn more about composing and sending in our Drafts documentation.