Drafts
What is a Draft?
A Draft is an unsent Message. It’s a resource that allows your agent to prepare the contents of an email—including recipients, a subject, a body, and Attachments—without sending it immediately.
We know agent reliability is big these days—with Drafts you can have agents have ready-to-send emails and only with your permission it can send them off into the world.
Drafts are a key component for building advanced agent workflows. They enable:
- Human-in-the-Loop Review: An agent can create a
Draftfor a sensitive or importantMessage, which a human can then review and approve before it’s sent. - Scheduled Sending: Your agent can create a
Draftand then have a separate process send it at a specific time, such as during business hours for the recipient. - Complex Composition: For
Messagesthat require multiple steps to build (e.g., fetching data from several sources, generating content),Draftsallow you to save the state of the email as it’s being composed.
The Draft Lifecycle
You can interact with Drafts throughout their lifecycle, from creation to the moment they are sent.
1. Create a Draft
This is the first step. You create a Draft in a specific Inbox that will eventually be the sender.
2. Get Draft
Once a Draft is created, you can retrieve it by its ID
3. Send a Draft
This is the final step that converts the Draft into a sent Message. Once sent, the Draft is deleted.
Note that now we access it by message_id now because now its a message!!
Scheduled Sending
You can schedule a Draft to be sent automatically at a future time by passing the send_at field when creating or updating a Draft. AgentMail will automatically send it at the specified time—no cron jobs or polling required.
Schedule a Draft
Pass an ISO 8601 datetime string to send_at. The Draft will be automatically labeled scheduled and its send_status will be set to scheduled.
Cancel or Reschedule
To cancel a scheduled send, delete the Draft. To reschedule, update send_at with a new time.
List Scheduled Drafts
When a Draft is created with send_at, it is automatically labeled scheduled. You can filter for scheduled drafts using the labels query parameter.
send_status Values
scheduled— The draft is queued and will be sent at thesend_attime.sending— The draft is currently being processed for delivery.failed— The send attempt failed. You can retry by updatingsend_atto a new time.
Conditional Follow-Ups
A common pattern is “send a follow-up in 3 days, but only if they haven’t replied.” You can implement this by scheduling a follow-up Draft, then cancelling it via Webhook if a reply arrives.
1. Send the initial email and schedule the follow-up:
2. Cancel on reply via webhook:
When a reply comes in, look for the follow-up:<draft_id> label on the thread and delete the draft.
If the prospect replies, the follow-up is cancelled. If they don’t, it sends automatically at the scheduled time.
Org-Wide Draft Management
Similar to Threads, you can list all Drafts across your entire Organization. This is perfect for building a central dashboard where a human supervisor can view, approve, or delete any Draft created by any agent in your fleet.
Copy for Cursor / Claude
Copy one of the blocks below into Cursor or Claude for complete Drafts API knowledge in one shot.
