Create Draft Reply

Create a draft that replies to a message instead of sending it. The recipients, subject, and threading are derived from the source message. Send it later with `Send Draft`. **CLI:** ```bash agentmail inboxes:messages draft-reply --inbox-id <inbox_id> --message-id <message_id> --text "Reply text" ```

Authentication

AuthorizationBearer

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

Path parameters

inbox_idstringRequired
The ID of the inbox.
message_idstringRequired
ID of message.

Request

This endpoint expects an object.
labelslist of stringsOptional
Labels of draft.
reply_tolist of stringsOptional

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

tolist of stringsOptional

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

cclist of stringsOptional

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

bcclist of stringsOptional

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

reply_allbooleanOptional
Reply to all recipients of the original message.
subjectstringOptional
Subject of draft.
textstringOptional
Plain text body of draft.
htmlstringOptional
HTML body of draft.
attachmentslist of objectsOptional
Attachments to include in draft.
send_atdatetimeOptional
Time at which to schedule send draft.
client_idstringOptional
Client ID of draft.

Response

This endpoint returns an object.
inbox_idstring
The ID of the inbox.
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
Client ID of draft.
reply_tolist of strings

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

tolist of strings

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

cclist of strings

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

bcclist of strings

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

subjectstring
Subject of draft.
previewstring
Text preview of draft.
textstring
Plain text body of draft.
htmlstring
HTML body of draft.
attachmentslist of objects
Attachments in draft.
in_reply_tostring
ID of message being replied to.
forward_ofstring
ID of message being forwarded.
referenceslist of strings
IDs of previous messages in thread.
send_statusenum
Schedule send status of draft.
send_atdatetime
Time at which to schedule send draft.

Errors

400
Validation Error
404
Not Found Error