---
title: "Update Draft"
method: PATCH
path: "/v0/inboxes/{inbox_id}/drafts/{draft_id}"
tags: ["InboxesDrafts"]
---

# Update Draft

`PATCH /v0/inboxes/{inbox_id}/drafts/{draft_id}`

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:**
```bash
agentmail inboxes:drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject "Updated subject"
```

## Path parameters

- `inbox_id` string, required — The ID of the inbox.
- `draft_id` string, required — ID of draft.

## Request body

- UpdateDraftRequest — Edit fields on an existing draft. A draft's kind (plain, reply, or forward) is fixed at creation and cannot be changed here. Omitting a field leaves it unchanged; passing `null` (or `[]` for a recipient field) clears it. Pass `send_at` to schedule or reschedule the draft, or `null` to un-schedule it.
  - `reply_to` string[] — Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `to` string[] — Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `cc` string[] — Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `bcc` string[] — Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `subject` string — Subject of draft.
  - `text` string — Plain text body of draft.
  - `html` string — HTML body of draft.
  - `add_attachments` SendAttachment[], nullable — Attachments to add to the draft.
    - `filename` string — Filename of attachment.
    - `content_type` string — Content type of attachment.
    - `content_disposition` 'inline' | 'attachment' — Content disposition of attachment.
    - `content_id` string — Content ID of attachment.
    - `content` string, nullable — Base64 encoded content of attachment.
    - `url` string, nullable — URL to the attachment.
  - `remove_attachments` AttachmentId[], nullable — IDs of attachments to remove from the draft.
  - `add_labels` string[] — Labels of draft.
  - `remove_labels` string[] — Labels of draft.
  - `send_at` string, date-time — Time at which to schedule send draft.

## Response `200`

- Draft
  - `inbox_id` string, required — The ID of the inbox.
  - `draft_id` string, required — ID of draft.
  - `client_id` string — Client ID of draft.
  - `labels` string[], required — Labels of draft.
  - `reply_to` string[] — Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `to` string[] — Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `cc` string[] — Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `bcc` string[] — Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.
  - `subject` string — Subject of draft.
  - `preview` string — Text preview of draft.
  - `text` string — Plain text body of draft.
  - `html` string — HTML body of draft.
  - `attachments` Attachment[] — Attachments in draft.
    - `attachment_id` string, required — ID of attachment.
    - `filename` string — Filename of attachment.
    - `size` integer, required — Size of attachment in bytes.
    - `content_type` string — Content type of attachment.
    - `content_disposition` 'inline' | 'attachment' — Content disposition of attachment.
    - `content_id` string — Content ID of attachment.
  - `in_reply_to` string — ID of message being replied to.
  - `forward_of` string — ID of message being forwarded.
  - `references` string[], nullable — IDs of previous messages in thread.
  - `send_status` 'scheduled' | 'sending' | 'failed' — Schedule send status of draft.
  - `send_at` string, date-time — Time at which to schedule send draft.
  - `updated_at` string, date-time, required — Time at which draft was last updated.
  - `created_at` string, date-time, required — Time at which draft was created.

## Other responses

- `400`
- `404`
- `409`

---

[API](https://skmtc.net/agentmail-to/apis/api.md) · [All operations](https://skmtc.net/agentmail-to/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agentmail-to/api/revisions/394ddcdd9c29/schema)
