← Back to AgentMail
PATCH/v0/inboxes/{inbox_id}/drafts/{draft_id}
Update Draft
Update an existing draft. Only the fields you include will be changed; omitted fields are left unchanged.
AgentMail·Free
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "agentmail",
path: "/v0/inboxes/{inbox_id}/drafts/{draft_id}"
});
console.log(output);Body parameters
to
array
Updated recipient email addresses.
cc
array
Updated CC recipients.
bcc
array
Updated BCC recipients.
reply_to
array
Updated reply-to addresses.
subject
string
Updated subject line.
text
string
Updated plain text body.
html
string
Updated HTML body.
labels
array
Updated labels.
attachments
array
Updated attachments: {filename, content_type, content (base64)} or {filename, content_type, url}.
headers
object
Updated custom email headers.
Response
to.0
string
labels.0
string
pod_id
string
subject
string
draft_id
string
inbox_id
string
created_at
string
updated_at
string
organization_id
string