---
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}`

## Request

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

**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
  - `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.
  - `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.
  - `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

- `404`

---

[API](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/revisions/869b7f1c360c?raw)
