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
  • API Reference
      • GETList Pods
      • GETGet Pod
      • POSTCreate Pod
      • DELDelete Pod
        • GETList Drafts
        • GETGet Draft
        • GETGet Attachment
LogoLogo
contact@agentmail.ccDiscord
API ReferencePodsDrafts

List Drafts

GET
/v0/pods/:pod_id/drafts
GET
/v0/pods/:pod_id/drafts
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.pods.drafts.list(
8 pod_id="pod_id",
9)
1{
2 "count": 1,
3 "drafts": [
4 {
5 "inbox_id": "inbox_id",
6 "draft_id": "draft_id",
7 "labels": [
8 "labels",
9 "labels"
10 ],
11 "updated_at": "2024-01-15T09:30:00Z",
12 "to": [
13 "to",
14 "to"
15 ],
16 "cc": [
17 "cc",
18 "cc"
19 ],
20 "bcc": [
21 "bcc",
22 "bcc"
23 ],
24 "subject": "subject",
25 "preview": "preview",
26 "attachments": [
27 {
28 "attachment_id": "attachment_id",
29 "size": 1,
30 "filename": "filename",
31 "content_type": "content_type",
32 "content_disposition": "inline",
33 "content_id": "content_id"
34 },
35 {
36 "attachment_id": "attachment_id",
37 "size": 1,
38 "filename": "filename",
39 "content_type": "content_type",
40 "content_disposition": "inline",
41 "content_id": "content_id"
42 }
43 ],
44 "in_reply_to": "in_reply_to",
45 "send_status": "scheduled",
46 "send_at": "2024-01-15T09:30:00Z"
47 },
48 {
49 "inbox_id": "inbox_id",
50 "draft_id": "draft_id",
51 "labels": [
52 "labels",
53 "labels"
54 ],
55 "updated_at": "2024-01-15T09:30:00Z",
56 "to": [
57 "to",
58 "to"
59 ],
60 "cc": [
61 "cc",
62 "cc"
63 ],
64 "bcc": [
65 "bcc",
66 "bcc"
67 ],
68 "subject": "subject",
69 "preview": "preview",
70 "attachments": [
71 {
72 "attachment_id": "attachment_id",
73 "size": 1,
74 "filename": "filename",
75 "content_type": "content_type",
76 "content_disposition": "inline",
77 "content_id": "content_id"
78 },
79 {
80 "attachment_id": "attachment_id",
81 "size": 1,
82 "filename": "filename",
83 "content_type": "content_type",
84 "content_disposition": "inline",
85 "content_id": "content_id"
86 }
87 ],
88 "in_reply_to": "in_reply_to",
89 "send_status": "scheduled",
90 "send_at": "2024-01-15T09:30:00Z"
91 }
92 ],
93 "limit": 1,
94 "next_page_token": "next_page_token"
95}
**CLI:** ```bash agentmail pods:drafts list --pod-id <pod_id> ```
Was this page helpful?
Previous

Get Draft

Next
Built with

CLI:

$agentmail pods:drafts list --pod-id <pod_id>

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

pod_idstringRequired
ID of pod.

Query parameters

limitintegerOptional
Limit of number of items returned.
page_tokenstringOptional
Page token for pagination.
labelslist of stringsOptional
Labels to filter by.
beforedatetimeOptional
Timestamp before which to filter by.
afterdatetimeOptional
Timestamp after which to filter by.
ascendingbooleanOptional
Sort in ascending temporal order.

Response

This endpoint returns an object.
countinteger
Number of items returned.
draftslist of objects

Ordered by updated_at descending.

limitinteger
Limit of number of items returned.
next_page_tokenstring
Page token for pagination.

Errors

404
Not Found Error