contact@agentmail.ccDiscord
DocumentationAPI ReferenceChangelog
DocumentationAPI ReferenceChangelog
  • API Reference
Logo
contact@agentmail.ccDiscord
API ReferencePodsDrafts

GET
/v0/pods/:pod_id/drafts/:draft_id
GET
/v0/pods/:pod_id/drafts/:draft_id
1from agentmail import AgentMail
2
3client = AgentMail(
4 base_url="https://api.agentmail.to",
5 api_key="YOUR_TOKEN_HERE"
6)
7
8client.pods.drafts.get(
9 pod_id="pod_id",
10 draft_id="draft_id"
11)
Try it
200Retrieved
1{
2 "inbox_id": "inbox_id",
3 "thread_id": "thread_id",
4 "draft_id": "draft_id",
5 "labels": [
6 "labels",
7 "labels"
8 ],
9 "updated_at": "2024-01-15T09:30:00Z",
10 "created_at": "2024-01-15T09:30:00Z",
11 "client_id": "client_id",
12 "reply_to": [
13 "reply_to",
14 "reply_to"
15 ],
16 "to": [
17 "to",
18 "to"
19 ],
20 "cc": [
21 "cc",
22 "cc"
23 ],
24 "bcc": [
25 "bcc",
26 "bcc"
27 ],
28 "subject": "subject",
29 "preview": "preview",
30 "text": "text",
31 "html": "html",
32 "attachments": [
33 {
34 "attachment_id": "attachment_id",
35 "size": 1,
36 "inline": true,
37 "filename": "filename",
38 "content_type": "content_type"
39 },
40 {
41 "attachment_id": "attachment_id",
42 "size": 1,
43 "inline": true,
44 "filename": "filename",
45 "content_type": "content_type"
46 }
47 ],
48 "in_reply_to": "in_reply_to",
49 "references": [
50 "references",
51 "references"
52 ],
53 "send_status": "scheduled",
54 "send_at": "2024-01-15T09:30:00Z"
55}
Was this page helpful?
Previous

List Domains

Next
Built with
Get Draft

Authentication

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

Path Parameters

pod_idstringRequired
ID of pod.
draft_idstringRequired
ID of draft.

Response

This endpoint returns an object.
inbox_idstring
ID of inbox.
thread_idstring
ID of thread.
draft_idstring
ID of draft.
labelslist of strings
Labels of draft.
updated_atdatetime
Time at which draft was last updated.
created_atdatetime
Time at which draft was created.
client_idstring or null
Client ID of draft.
reply_tolist of strings or null
Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.
tolist of strings or null
Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
cclist of strings or null
Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
bcclist of strings or null
Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
subjectstring or null
Subject of draft.
previewstring or null
Text preview of draft.
textstring or null
Plain text body of draft.
htmlstring or null
HTML body of draft.
attachmentslist of objects or null
Attachments in draft.
in_reply_tostring or null
ID of message being replied to.
referenceslist of strings or null
IDs of previous messages in thread.
send_statusenum or null
Schedule send status of draft.
Allowed values:
send_atdatetime or null
Time at which to schedule send draft.

Errors

Addresses of CC recipients. In format username@domain.com or Display Name <username@domain.com>.

Addresses of recipients. In format username@domain.com or Display Name <username@domain.com>.

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

Addresses of BCC recipients. In format username@domain.com or Display Name <username@domain.com>.

Reply-to addresses. In format username@domain.com or Display Name <username@domain.com>.