inboxes > drafts

Edit fields on an existing draft. Passing null clears a field (or [] for a recipient field); send_at: null un-schedules a scheduled draft. A draft that is already being sent cannot be edited.

CLI:

agentmail inboxes drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject "Updated subject"
patch/v0/inboxes/{inbox_id}/drafts/{draft_id}

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts/{draft_id}
  • Auth
    HTTP bearer

Path parameters

inbox_idstring required

The ID of the inbox.

draft_idstring required

ID of draft.

Request body

reply_tostring[]

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

tostring[]

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

ccstring[]

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

bccstring[]

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

subjectstring

Subject of draft.

textstring

Plain text body of draft.

htmlstring

HTML body of draft.

remove_attachmentsAttachmentsAttachmentId[]

IDs of attachments to remove from the draft.

add_labelsstring[]

Labels of draft.

remove_labelsstring[]

Labels of draft.

send_atstring date-time

Time at which to schedule send draft.

Response

Response with status 200

inbox_idstring required

The ID of the inbox.

draft_idstring required

ID of draft.

client_idstring

Client ID of draft.

labelsstring[] required

Labels of draft.

reply_tostring[]

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

tostring[]

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

ccstring[]

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

bccstring[]

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.

in_reply_tostring

ID of message being replied to.

forward_ofstring

ID of message being forwarded.

referencesstring[]

IDs of previous messages in thread.

send_status'scheduled' | 'sending' | 'failed'

Schedule send status of draft.

send_atstring date-time

Time at which to schedule send draft.

updated_atstring date-time required

Time at which draft was last updated.

created_atstring date-time required

Time at which draft was created.

Changes

    • breaking

      the request property became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property type changed from array to no type

    • breaking

      the request property type changed from array to no type

    • breaking

      the request property type changed from string to no type

    • breaking

      the request property type changed from array to no type

    • breaking

      the request property type changed from string to no type, and format from date-time to no format

    • breaking

      the request property type changed from string to no type

    • breaking

      the request property type changed from string to no type

    • breaking

      the request property type changed from array to no type

    • info

      the endpoint scheme security Bearer was added to the API

    • info

      the endpoint scheme security BearerAuth was removed from the API

    • info

      api tag inboxes > drafts added

    • info

      api tag InboxesDrafts removed

    • info

      request body became optional

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added subschema #2 to the request property oneOf list

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status